SharePoint onPrem 2013, 2016, 2019
Uninstall feature from SharePoint is one of the most important issue especially if you don’t know GUID for it. To uninstall the feature, you will need to get the feature first. Open SharePoint CMD as admin and use the following command
Get-SPFeature | where { $_.DisplayName.StartsWith("the feature name to be removed") }
Also, the feature can be found by GUID as in the following command
Get-SPFeature | where { $_.Id.ToString().StartsWith("Feature GUID") }
The complete command to uninstall the feature
Get-SPFeature | where { $_.DisplayName.StartsWith("feature name") } |
foreach { Uninstall-SPFeature $_.Id -confirm:0 -force }
This command is very helpful especially when the retract didn’t go well and the feature became orphaned feature .