Powershell: languagepack 0

Powershell Error: Cannot uninstall the LanguagePack 0 because it is not deployed.

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!

Error "Update-SPSolution : Cannot uninstall the LanguagePack 0 because it is not deployed."
Error “Update-SPSolution : Cannot uninstall the LanguagePack 0 because it is not deployed.”

In Central Admin the solution is in an Error state.

WSP Solution in error state in Central Administration on SharePoint Server
WSP Solution in error state in Central Administration on SharePoint Server

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 :)

  1. Set the feature’s auto-install off (from feature properties)

  2. Rebuild and package the solution again

  3. 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)

  4. Install-SPSolution with -force

And voilà! Everything should be working again.

mm
4 1 vote
Article Rating
Subscribe
Notify of
guest

2 Comments
most voted
newest oldest
Inline Feedbacks
View all comments