Most times we do not remove replication from a server once it’s been setup but there are occasional scenarios where it may be required. E.g. when decommissioning a server or changing the high availability plan for a particular database server. Removing replication is much easier than setting it up and can be done within a few simple steps. The below screenshots take you step by step on how to remove replication from the database server. It’s a good idea to confirm if there are any publications or subscriptions on the server and handle them before starting the below steps.
If you encounter an error saying the distribution database is in user and you should the database context to master follow the steps mentioned here
And that’s it.