Manual Uninstallation of Sitecore (Step-by-step guide)
Tags: dotnet, tutorial, webdev, sitecore
Published: 2022-10-05 17:22:29

Hey, there! In this tutorial, we'll learn step by step how to remove a Sitecore solution manually. This process includes deleting the associated services, files, and databases. 

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xrgy41rktktr6y66unjx.png)
For our example we'll remove this solution called _dev.sc_. 

### **Step 1: Remove the IIS configuration.**

For this process, we'll have to go to the Internet Information Services (IIS) Manager, and delete the Sitecore sites (Solution, Identity Server, and X Connect). 

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uvpgb80ojjjex9xdyyb3.png)

### **Step 2: Delete entries in the hosts' file.**

Next, we must delete the three entries of the hosts (with admin permissions), as we can see in the following image: 

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nh48ch68nbw4jwqdawzg.png)

Configuration file path: `C:\Windows\System32\drivers\etc\hosts`.

### **Step 3: Delete associated Windows services.**

In the Task Manager, within the Services section, we can see the services associated with our Sitecore solution. Before proceeding to remove them, we'll stop these services. 

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qjqsm758019qxjiv3uge.png) 

Then, from the command console (in admin mode), we'll eliminate each of the services as we can see in the image:

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9gba5qqghiq543p3zynl.png) 

Command: `SC.exe DELETE [Service_Name]`.

### **Step 4: Delete the associated IIS APPPOOL user profiles.**

To eliminate these users, as verification, we must first go to the Task Manager, and in Details we can check if there are processes with `w3wp.exe` that are running our Sitecore instance. In that case, we'll only need to stop these processes. 

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3g001kxk675kakbf23h0.png)
 
Then, in *Windows Settings – About – Advanced System Settings*, we can see the properties of the system, and in settings we can delete the associated users.

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6vuhtmbjw8e8zmog36zg.png)
 
### **Step 5: Delete the databases from the Sitecore solution**

In this process, we can go to the _SQL Server Management Studio_, connect to our local server, and delete the corresponding databases. 

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1l4fd7rjgp2rzs9bm5kz.png)

### **Step 6: Delete the file directory.**

To finish the uninstallation of Sitecore, what remains is to delete the directories of our solution:

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8xqrdcvwqhf24jibrkda.png)
 
General location of the instance: `C:\inetpub\wwwroot\<Instance_Name>\`.

### **Step 7 - Plus: Delete/Remove Solr service.**

To remove Solr, or remove the indexes of our Sitecore instance, we have these two possible cases:

#### A. Remove the indexes of the instance.

If we want to preserve the Solr service, all we have to do is eliminate the associated indices. For this, we'll first stop the Solr service, and finally we will eliminate the indices on the path: `C:\Solr\<Your_Solr_Folder>\server\solr\`.

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sivg1mqlrxo9k6t8ehlm.png)

#### B. Remove Solr service. 

The second case is to remove the associated Solr service completely. For this, we must follow the following steps:

- Stop the Solr service.
- Delete the service in the console: `SC.exe DELETE [Solr_Service_Name]`.
- Delete the Solr directory: `C:\Solr\<Your_Solr_Folder>`.

### **The Sitecore instance is now uninstalled!**

That's great! Now our sitecore instance is completely removed.

If you have any questions or ideas in mind, it will be a pleasure to be able to be in communication with you, and together exchange knowledge with each other.

See you on [Twitter](https://twitter.com/esDanielGomez) / [esDanielGomez.com](https://esdanielgomez.com).