  Let $w\in L^1\_{loc}(\R^n)$ be apositive weight. Assuming that a doubling
condition and an $L^1$ Poincar\'e inequality on balls for the measure $w(x)dx$,
as well as a growth condition on $w$, we prove that the compact subsets of
$\R^n$ which are removable for the distributional divergence in
$L^{\infty}\_{1/w}$ are exactly those with vanishing weighted Hausdorff
measure. We also give such a characterization for $L^p\_{1/w}$,
$1\textless{}p\textless{}+\infty$, in terms of capacity. This generalizes
results due to Phuc and Torres, Silhavy and the first author.
