SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the best way to completely remove a WSP from SharePoint? SO when you reinstall it again from scatch it thinks it is a clean install?

share|improve this question
up vote 10 down vote accepted

We can either manually do it through central admin or by using powershell commands.

I would prefer doing this through powershell

To uninstall and remove Farm solutions use the Uninstall-SPSolution and Remove-SPSolution cmdlets (Use -WebApplication attribute if the solution has webapplication-scoped resources):

Uninstall-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://webapplication  

Remove-SPSolution –Identity MySharePointSolution.wsp 

To uninstall and remove Sandbox solutions use the Uninstall-SPUserSolution and Remove-SPUserSolution cmdlets:

Uninstall-SPUserSolution –Identity MySharePointSolution.wsp –Site http://webapplication/sitecollection  

Remove-SPUserSolution –Identity MySharePointSolution.wsp –Site http://webapplication/sitecollection 
share|improve this answer
Remember that any artifacts that were added to the Content DB (for example .webpart files in de Web Part Gallery) will still exist after the WSP is completely removed from the farm. – Jaap Vossers Jan 31 '12 at 13:53
Also remember to deactivate any features in the solution prior to removing it – Dave Wise Jan 31 '12 at 15:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.