Tag Archives: uninstall module

How to Uninstall a Package or Module from Sitecore

There are times when I have been asked to uninstall a package, Sitecore Marketplace module (package), or even an internal Sitecore module (package) that your company has developed for a client.  In the event you are not aware of this fact, there is not a rollback feature on packages in an out of the box Sitecore installation.  Hence, if you want to rollback a package you basically need backups of the files and the databases and can then perform a restore procedure with them. If you don’t have the time for backups or forgot to make backups before installing the package below are the basic steps to uninstall a package manually:

Basics for uninstalling a package:

Download the original package/module again so you can analyze the contents.  It should be downloaded as a .zip file.

Extract the .zip file and you will see a package.zip file.  Extract the contents of that as well and you will see the contents of the package as such:

Package Contents

Start with the manual deletion of the items first. Please keep in mind that every module may be different so prior planning on what items or fields need to stay is dependent upon client needs and the architecture.  Just make sure that when you delete items that they truly need to be deleted based on your clients needs. In my case, I moved a couple of fields to another template so the data and field ID’s remained after I uninstalled the module.

Drill down into the items folder and you will see where the items are. These will be the items that you need to manually delete.  For instance, in my example I need to delete the following: \items\core\sitecore\content\Applications\WebEdit\Edit Frame Buttons\Metadata\Edit Metadata\{E43B0BB5-2158-4880-AC16-ABE74593B556}

The GUID is the item and you can find it easily by using search in the Content Editor as such:

Item Search

Sometimes it’s best to open up another Sitecore admin instance for that same version or similar to compare the content items to just to make sure you are not deleting an item that was already in place before the package or module was installed.  It’s always a good reference. Also, if you are deleting from the master database it’s best to delete in this order:

  1. content
  2. layouts
  3. system
  4. templates

This will give you minimal to no linking issues as you manually delete the installed items.

After deleting the items from the core and master database, I perform a full republish just to ensure nothing is missed from the web database and everything is synced in entirety. Next, I rebuild the Link databases just to make sure that all links are correctly pointed.  You can Rebuild the Link Database in the Control Panel of the Desktop:

Rebuild the Link Database in Control Panel

Next, are the manual deletion of the files.  In my case there is only a .config file I need to delete in the \files\App_Config\Include directory and a .dll in the \files\bin directory.

The .config file I simply deleted so that the processor does not show up in the Web.config at runtime. However, I had to delete a reference to the .dll in a few projects from within the solution and this is where some refactoring may need to take place that was using that .dll.  In my case, there is some dependent code that was referencing the .dll used in the module so I had to refactor, delete code, rebuild, and publish back out to my website folder to test and make sure everything is working as it should.  After my testing, I am good to go!

That is all there is to it to uninstall a package or Sitecore module.  Just take your time and pay attention to detail.  I hope these steps can help you.  Happy coding!