  Let $T$ be a linear operator that, for some $p_1\in(1,\infty)$, is bounded on
$L^{p_1}(\tilde w)$ for all $\tilde w\in A_{p_1}(\mathbb R^d)$ and in addition
compact on $L^{p_1}(w_1)$ for some $w_1\in A_{p_1}(\mathbb R^d)$. Then $T$ is
bounded and compact on $L^p(w)$ for all $p\in(1,\infty)$ and all $w\in
A_p(\mathbb R^d)$. This "compact version" of Rubio de Francia's celebrated
weighted extrapolation theorem follows from a combination of results in the
interpolation and extrapolation theory of weighted spaces on the one hand, and
of compact operators on abstract spaces on the other hand. Moreover,
generalizations of this extrapolation of compactness are obtained for operators
that are bounded from one space to a different one ("off-diagonal estimates")
or only in a limited range of the $L^p$ scale. As applications, we easily
recover several recent results on the weighted compactness of commutators of
singular integral operators, fractional integrals and pseudo-differential
operators, and obtain new results about the weighted compactness of commutators
of Bochner-Riesz multipliers.
