TITLE: Constant curvature metrics on complements of codimension 2 submanifolds
QUESTION [6 upvotes]: I apologize in advance for my lack of knowledge with respect to geometry and the literature - any pointers are welcome.  Let $M^n$ be a closed smooth $n$-dimensional manifold.  Call $M$ good if for every $c \in \mathbb{R}$ there exists a codimension 2 closed submanifold $X^{n-2}$ so that $M-X$ admits metrics $g$ of constant scalar curvature $c$.  What are some necessary/sufficient conditions for $M$ to be good?
In dimension 3, $S^3$ admits such metrics for $c > 0$ with $X$ empty.  Taking $X$ to be the unknot and removing it we have $\mathbb{R}^2 \times S^1$ which admits a flat metric, and for $c<0$, removing a point yields $\mathbb{R}^3$ and so any nonempty $X$ does the trick.  By the Lickorish–Wallace theorem, this then extends to all such 3-manifolds. So all such 3-manifolds are good.
In dimension 2, by taking $X$ to be empty, 2 points, or a single point, depending on if $c$ is positive, zero, or negative, we see that $S^2$ is good. Positive genus surfaces presumably can not be good by some variation of Gauss-Bonnet.
What about in dimension 4? In dimension $n$?  I would also be interested in hearing about the variation of the problem with constant sectional curvature metrics.
Edit:
Michael Albanese completely answers my original version of the question below.  But I am also interested in the case where all of the metrics are complete.

REPLY [7 votes]: Theorem 1.4 of Kazdan & Warner's Scalar Curvature and Conformal Deformation of Riemannian Structure states the following:

Let $M$ be a noncompact manifold of dimension $\geq 3$ diffeomorphic to an open submanifold of some compact manifold $M_1$. Then every $K \in C^{\infty}(M)$ is the scalar curvature of some Riemannian metric on $M$.

So for any closed smooth manifold $M$ of dimension at least three, and any closed smooth codimension two submanifold $X$, every smooth function arises as the scalar curvature of some metric on $M - X$. In particular, $M$ is good.