This post was most recently updated on August 26th, 2022.
2 min read.Have you ever run into this, very non-descriptive and weird SharePoint error message “Cannot uninstall the LanguagePack 0 because it is not deployed”? You could encounter it while running some PowerShell scripts – most typically when trying to update a wsp solution.
I have, and luckily often easily solved!
Symptoms
Assume you’re trying to install, update or uninstall a SharePoint solution (.wsp package) using PowerShell-commands Install-SPSolution, Update-SPSolution, or Uninstall-SPSolution (respectively). The operation fails with the following (or similar) error:
Error: Cannot uninstall the LanguagePack 0 because it is not deployed
I have actually seen this also in the form of “Cannot uninstall Language Pack 0 because it is not deployed”. However, I think the more relevant form of the error is the one that pops up in PowerShell. See below for an example!
In Central Admin the solution is in an Error state.
Problem
Not really clear, to be honest – most likely, it’s an issue in how SharePoint localizes some of the content types or other declarative artifacts.
Solution
You can find quite a lot of solutions online, but they weren’t really working for me. I tried restarting services, removing the package, and meddling with the DLL files, but to no avail. However, the actual “last operation details” on the CA page hinted, that the problem was in fact in one of the features. The feature in question included some content types, and toying around with them is like playing baseball with hand grenades, so you have to tread carefully in cases like these.
So, what did I do?
Time needed: 15 minutes
How to fix “Cannot uninstall the LanguagePack 0 because it is not deployed.” when it’s caused by your custom code :)
- Set the feature’s auto-install off (from feature properties)
- Rebuild and package the solution again
- Update the package (this will likely result in an error but we’ll get the latest code to the farm, just not deployed to servers)
- Install-SPSolution with -force
And voilà! Everything should be working again.
- M365 Copilot claiming “You have turned off web search in the work mode”? Easy fix! - November 19, 2024
- “Performing cleanup” – Excel is stuck with an old, conflicted file and will never recover. - November 12, 2024
- How to add multiple app URIs for your Entra app registration? - November 5, 2024