Removing obsolete items in Sitecore Package Designer

by Alan Yip, Senior Sitecore Consultant@ClearPeople

Removing obsolete items in Sitecore Package Designer

by Alan Yip, Senior Sitecore Consultant @ CleaPeople

Sitecore’s Package Designer is a very useful tool for packaging Sitecore items and transferring these between different environments.


There is a very useful feature in there where you can store the structure of these items in a definition file as XML. This can then be stored somewhere and later ran against the latest content tree or wherever you decide to generate the content from and a new package is then created.

In one of my latest projects, I had to do a migration of content from one environment to another. This was not a simple straight forward migration, but that is something else.

I was in continuous communications with the clients’ developer and they were responsible for creating these packages. Now as most projects go, there will always be obstacles in the way and this project was no different.

The developer had generated the structure of the content into a definition file which was going to be used for the real content packaging, but as time went by, the actual packaging of the content didn’t actually happen until a few months later in which case, we all know content comes and goes.

Yes you’ve guessed it, when I tried to generate the content, I got the nice “Package generation failed…” error!

Package Failed


 
But luckily, I found a nice little gem that was to become my lucky charm and that was the “Remove obsolete” button!

Remove Obsolete
 
This button removes any items that don’t exist in your current Sitecore tree thus making the creation of your package possible!

NOTE: After pressing this button, it doesn’t save a copy of the updated XML definition so it’s entirely up to you how you want to manage this.

Happy packaging!