I am deploying a sharepoint 2010 custom document library template as a solution file and activating it to my site. When i am deleting the solution and deactivating the feature i also want to delete the libraries that were created from this template with all its contents. I have an uninstaller.bat file that performs the deactivation, i want to include the library removal script with the uninstaller. Is it possible to remove the libraries through stsasdm command?
Delete a sharepoint 2010 document library using stsadm command?
1.8k views Asked by Shankar At
2
There are 2 answers
1
On
You could write a Feature Receiver http://msdn.microsoft.com/en-us/library/ms469501.aspx that runs when the Feature is deactivated that will take care of the deletes for you.
You can use Forcedeletelist, but you will need to know the URLs of the libraries you want to delete. Note, despite the name, this command will not delete the list if AllowDeletion is set to false.
Two things to consider: