I have installed Sitecore 9 on a machine, but I needed also to clean up at one point.
There are already a couple of articles/references for this subject:
- http://insitecore.blogspot.com/2017/11/easy-uninstall-sitecore-9.html
- https://himadritechblog.wordpress.com/2017/10/27/a-powershell-script-for-removing-sitecore-9-instance-from-local-machine/
- https://www.sitecorgi.net/uninstall-sitecore-9/
- https://github.com/Sitecorgi/UninstallSitecore9
- https://sitecore.stackexchange.com/questions/8107/how-to-uninstall-an-instance-created-using-the-sitecore-install-framework
But I’ve decided to use Rob’s uninstall scripts referenced here in his introductory article about SIF-less, but in case you want to do it in a manual way, I wrote some steps below.
But also this process requires some extra assistance/adjustments as I am having the necessary SQL server installed on a different machine.
Before running the scripts that were generated by SIF-less, make sure to install SQL Server PowerShell Module by opening PowerShell as administrator by running this command:
Install-Module -Name SqlServer -AllowClobber
For more information look at this page that has the official documentation for installing the SQL Server PowerShell module.
Then copy the remove json files from the folder Scripts
that comes with the the SIF-less archive into the folder for your XP0 Configuration files
, defined by $PSScriptRoot
in the install script and then copy the Invoke psm1 files from the folder Scripts
that comes with the the SIF-less archive into the folder that has your uninstall script.
Extra: if Sitecore 9 was installed using a different folder than the default one, using instructions from here, then the removal scripts remove-sitecore-XP0.json or remove-xconnect-xp0.json have to be modified too, in similar way.
Manual way to uninstall an instance of Siteocre 9 involves few steps, but it is not that bad. Assuming that your installation instance is prefixed with xp0Demo
then:
- Remove the two xConnect windows services (with
sc.exe delete [servicename]
in poweshell as administrator or in cmd.exe as administrator too)xp0Demo.xconnect-MarketingAutomationService
xp0Demo.xconnect-IndexWorker
- Remove the Sitecore and xConnect website and application pools from IIS
- Remove the Sitecore and xConnect webroots
- Remove the databases from SQL Server prefixed with
xp0Demo
- Stop the Sorl service and remove the indexes prefiex with
xp0Demo
from folderc:\solr\solr-6.6.2\server\solr\
. Do not forget to start the Solr service again. - Hosts entries that are prefixed with
xp0Demo
should be removed too
Also, I’ve tested the procedure on a Sitecore 9 update 1 and its exactly the same, not changes required.