Uninstall Sitecore Local Instance
The Sitecore installer does not come with the ability to uninstall or delete the local instance. we can uninstall using the following steps.
Assumptions
Sitecore XP single on-prem installed
The instance Name prefix is set as “s10” as part of the installation (you can replace “s10” with your local instance name prefix used while installing Sitecore).
Uninstalling Sitecore
Here are the steps to uninstall Sitecore from your local machine
Go to Services and check for Sitecore Services, you should see 3 services
s10xconnect.dev.local-MarketingAutomationService
s10xconnect.dev.local-ProcessingEngineService
s10xconnect.dev.local-IndexWorker
Stop all the 3 services
Delete Services using PowerShell
Open PowerShell as Administrator
Run the following commands
sc.exe delete s10xconnect.dev.local-MarketingAutomationService
sc.exe delete s10xconnect.dev.local-ProcessingEngineService
sc.exe delete s10xconnect.dev.local-IndexWorker
On running each of these commands you should see the following message
DeleteService SUCCESS
Delete Web Applications
Open Internet Information Services (IIS) Manager
Go to App Pools and Stop following apps
s10.dev.local
s10identityserver.dev.local
s10xconnect.dev.local
Go to Sites and remove the following Sites
s10.dev.local
s10identityserver.dev.local
s10xconnect.dev.local
Go back to App Pools and remove the following App pools
s10.dev.local
s10identityserver.dev.local
s10xconnect.dev.local
Delete Web Application Files
Open File Explorer and go to “C:\inetpub\wwwroot” and delete the following folders
s10.dev.local
s10identityserver.dev.local
s10xconnect.dev.local
Delete Database
Open SQL Server Management Studio and log in with “sa” account
Run the following SQL script from the Master database query editor
DROP DATABASE [s10_Core];
DROP DATABASE [s10_EXM.Master];
DROP DATABASE [s10_ExperienceForms];
DROP DATABASE [s10_MarketingAutomation];
DROP DATABASE [s10_Master];
DROP DATABASE [s10_Messaging];
DROP DATABASE [s10_Processing.Pools];
DROP DATABASE [s10_Processing.Tasks];
DROP DATABASE [s10_ProcessingEngineStorage];
DROP DATABASE [s10_ProcessingEngineTasks];
DROP DATABASE [s10_ReferenceData];
DROP DATABASE [s10_Reporting];
DROP DATABASE [s10_Web];
DROP DATABASE [s10_Xdb.Collection.Shard0];
DROP DATABASE [s10_Xdb.Collection.Shard1];
DROP DATABASE [s10_Xdb.Collection.ShardMapManager];
Delete Host file entries
Open the following folder in file explorer “C:\Windows\System32\drivers\etc”
Open the “Hosts” file as Administrator in notepad
Delete the following lines
127.0.0.1 s10identityserver.dev.local
127.0.0.1 s10xconnect.dev.local
127.0.0.1 s10.dev.local
With this, your Sitecore instance is now uninstalled from your local machine.