Uninstall a workflow (SharePoint Foundation 2010)
Published: May 12, 2010
When a workflow that was installed as a Feature is no longer needed, you can uninstall it by using the Uninstall-SPFeature cmdlet in the SharePoint 2010 Management Shell in the same manner that you uninstall any SharePoint Feature. For more information, see Uninstall-SPFeature.
To run Windows PowerShell, ensure that you have met the following minimum requirements:
Visual Studio workflows are always installed as Features and declarative workflows that have been packaged into wsp files can be deployed as a feature or as solutions in the Solution Gallery. Note that workflows that are deployed directly from Microsoft SharePoint Designer 2010 are not deployed as Features. To uninstall a declarative workflow that was published directly from SharePoint Designer, you delete the source files of the workflow from the site collection on which it is installed. For more information, see Delete a SharePoint Designer workflow (SharePoint Foundation 2010).
Before you can use the Uninstall-SPFeature cmdlet to uninstall a Feature, all workflow instances have to be completed, canceled, or terminated and the workflow must be deactivated. After you uninstall a Feature, the workflow that is in that Feature is no longer available from the user interface, to associate with lists, to associate with libraries, and so on. The source files are still on the server to make it possible to later reinstall the workflow. Use the Windows PowerShell Install-SPFeature cmdlet to install the Feature again. For details, see Install-SPFeature.