It's been VTC'd as a duplicate of
that, but that doesn't cover the actual mechanics of how to properly remove the Ubuntu system and install it again (while preserving other OSes that might also be installed). I strongly suspect we have a question for that.