Answer
$$y= x\left( -\ln x+C\right) .$$
Work Step by Step
Rewrite the equation as
$$y'-x^{-1}y=-1$$
This is a linear equation and has the integrating factor as follows
$$\alpha(x)= e^{\int P(x)dx}=e^{-\int x^{-1} dx}=e^{-\ln x}=\frac{1}{x}$$
Now the general solution is
\begin{align}
y&=\alpha^{-1}(x)\left( \int\alpha(x) Q(x)dx +C\right)\\ &=x \left( \int -\frac{1}{x}dx +C\right)\\ &= x\left( -\ln x+C\right) \end{align}
Thus, the general solution is
$$y= x\left( -\ln x+C\right) .$$