It really depends on the model.
If you have one of the many devices made by HTC, you can probably find a plain replacement, unbranded ROM abailable at XDA-Developers.
If not, I got rid of them on my XDA phone without actually reflashing. I noticed that after it starts for the first time, it runs through an installation script. I simply hard rebooted the phone and clicked cancel during the installation stage (Or removed the battery during first boot - it was a few years ago, I can't really remember). This interrupted the installation - it doesn't free up the room, but it doesn't start the applications or look like they are installed.
If this doesn't help, you may be out of luck.