How to uninstall a Sitecore package in seconds

Installing a package is always easy in Sitecore but package uninstall has always been a grey area. There are a couple of options like these: aspx-based or then, Sitecore Rocks Anti-package.

I then thought why not some PS scripting. So, here it is:



Pre-requisites: Package file name must match name as what is present in <webroot>\App_Data\packages

Copy over the package zip file as it is from <webroot>\App_Data\packages folder  and place with uninstall package script in same folder and execute script through PowerShell command prompt. 

The script, unzips the package file, finds the location of all files and deletes those in the target instance and then finally deletes the package file from <webroot>\App_Data\packages folder too.


Just a few seconds to do the job!

Random check:

After the run, Services.GraphQL folder not present in the instance folder system:



Showconfig.aspx:

Cons: Can't handle Sitecore content packages





Comments

Popular Posts