Let (M, g) a compact Riemannian n-dimensional manifold. It is well know that, under certain hypothesis, in the conformal class of g there are scalar-flat metrics that have ∂M as a constant mean curvature hypersurface. Also, under certain hypothesis, it is known that these metrics are a compact set. In this paper we prove that, both in the case of umbilic and non-umbilic boundary, if we linearly perturb the mean curvature term hg with a negative smooth function α, the set of solutions of Yamabe problem is still a compact set.2000 Mathematics Subject Classification. 35J65, 53C21.