Sitecore Experience Commerce is the new offering from Sitecore in the commerce arena and it is getting lot of attraction. This blog presents a PowerShell script to help out developers during the uninstall process.
I have posted a reference installation script that I have used during installation, (originally taken from the documentation and then added actual version for the packages) so you can always refer to it and compare it with your own script.
It may happen that during your installation, you have entered an incorrect value for a parameter or path to one of the packages. Then you may want to uninstall the the module before you can re-install it again. Or may be you just want to uninstall the XC9 module to start from scratch. The process of uninstalling XC9 module can be difficult to do manually, so I present a a simple PowerShell script to automate it!
All you need to do is update the Param values (between line 3 and 15) to suit your installation variables and then run from the PS console:
Copy it locally in the deploy folder and run it like .\uninstall-commerce.ps1
All the script is doing is un-installing the SolrIndexes, IIS websites, website physical files and databases.
If you want to completely uninstall Sitecore 9 update 1 version, then use this script