Uninstall Sitecore 9.x: Remove Sitecore Certificates


With Sitecore 9.2 and above, Uninstalling Sitecore has never been much easier. The Uninstall-SitecoreConfiguration SIF PS Module Commandlet does a clean uninstall of the respective configurations installed on your workstation/server.

Here is the Command line for your reference:

Uninstall-SitecoreConfiguration @singleDeveloperParams *>&1 | Tee-Object XP0-SingleDeveloper-Uninstall.log

This comes up as a commented line in the respective SP Configuration Install PS1 script in the corresponding Installation Package. ex. XP0-SingleDeveloper.ps1

During the uninstall process, you could see the following activities being performed:

  1. Stop Websites
  2. Stop App Pool
  3. Remove App Pool
  4. Remove Website
  5. Remove Content (if any)
  6. Remove Host Headers
  7. Remove Databases
  8. Remove Solr Cores
  9. Stop Windows Service – Index Worker
  10. Stop Windows Service – Marketing Automation Service
  11. Stop Windows Service – Processing Engine Service
  12. Remove Windows Service – Index Worker
  13. Remove Windows Service – Marketing Automation Service
  14. Remove Windows Service – Processing Engine Service
  15. Remove Registry Entries

Note: Above steps are repeated for Sitecore, XConnect and Identity Server instances.

However, during this uninstall operation, the Certificates created still remain in your Windows Certificate Store. To uninstall these certificates, you can perform the following operation:

  1. Open up Microsoft Management Console (MMC)
    screenshot20-20sitecore20certificates20-20mmc
  2. File –> Add/Remove Snap-in.
    screenshot20-20sitecore20certificates20-20add20snap-in
  3. Select “Certificates” –> Next –> “Computer Account” –> Next –> Finish –> OK
    screenshot20-20sitecore20certificates20-20add20certificates20snap-in
  4. Navigate to “Personal” –> “Certificates” folder and observe the Sitecore Certificates as shown below:screenshot20-20sitecore20certificatesYou can select all Sitecore-specific certificates pertaining to the instance being uninstalled, right-click and delete.

Here is the reference of all Certificate Paths:

screenshot20-20sitecore20certificates20-20certificate20paths-1

PFX Certificate files are  stored in the following path:
C:\Sitecore (defined by the install configurations path)

screenshot20-20sitecore20certificates20-20local20certificate20paths

Now you have a clean Sitecore 9.2+ uninstall!

Hope this helps!

Feel free to leave a reply here...