A semi-analytical study is presented for the thermophoretic migration of a spherical particle located at an arbitrary position in a porous medium inside a spherical cavity. A uniform applied temperature gradient parallel to the line connecting the particle and cavity centres. The porous medium is modeled as a Brinkman fluid with a characteristic Darcy permeability $K$ that can be obtained directly from the experimental data. The porous medium is assumed to be homogenous, isotropic and the solid matrix is in thermal equilibrium with the fluid through the voids of the medium. The Knudsen number is supposed to be small so that the fluid flow through the porous medium can be described by a continuum model with a temperature jump, a thermal creep, a frictional slip and thermal stress slip at the surface of the aerosol particle. The Reynolds number of the fluid is assumed to be small enough to justify the use of the Brinkman equation, which is always satisfied because the aerosol particle is so small. The P{\’e}clet number for heat transfer in thermophoresis is also assumed to be small. The dimensionless thermophoretic velocity and the mobility coefficients are tabulated and represented graphically for various values of the permeability parameter, relative thermal and surface properties of the particle and cavity. Results are in good agreement with the analytical solution of the particular case of a particle located at the centre of the cavity.