SharePoint server 2016 uninstallation procedure.
- Web.config files, index files, log files, and customizations that you might have are not automatically removed when you uninstall SharePoint Server 2016.
- SQL Server databases are detached but are not removed from the database server.
- When you uninstall SharePoint Server 2016, all user data remains in the database files
Please follow the steps mentioned below to uninstall the SharePoint product from the server.
- Ensure that you are a member of the Farm Administrators group or a member of the Administrators group on the local computer.
- On the computer that runs SharePoint Server 2016, log on as a local or domain administrator.
- Start Control Panel.
- For Windows Server 2012 R2:
- On the Start screen, click Control Panel.
- In the Programs area, click Uninstall a program.
- In the Uninstall or change a program dialog box, click Microsoft SharePoint Server 2016.
- Click Change.
- On the Change your installation of Microsoft SharePoint Server 2016 page, click Remove, and then click Continue.
- A confirmation message appears.
- Click Yes to remove SharePoint Server 2016.
- A warning message appears.
- Click OK to continue.
- A confirmation message appears.
- Click OK.
- You might be prompted to restart the server.
Note: The Procedure mentioned above will be the same for Other versions of SharePoint un installation.
I hope the above information will help you to resolve the issue, in case of any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.