Powershell: languagepack 0

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

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). 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 the 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 Error state.

151117_ca

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?

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

 

The following two tabs change content below.

Antti K. Koskela

Solutions Architect / Escalations Engineer at Koskila / Norppandalotti Software / Valo Solutions
Antti Koskela is a proud digital native nomadic millenial full stack developer (is that enough funny buzzwords? That's definitely enough funny buzzwords!), who works as a Solutions Architect for Valo Intranet, the product that will make you fall in love with your intranet. Working with the global partner network, he's responsible for the success of Valo deployments happening all around the world. He's been a developer from 2004 (starting with PHP and Java), and he's been bending and twisting SharePoint into different shapes since MOSS. Nowadays he's not only working on SharePoint, but also on .NET projects, Azure, Office 365 and a lot of other stuff. This is his personal professional (e.g. professional, but definitely personal) blog.

2 thoughts on “Powershell Error: Cannot uninstall the LanguagePack 0 because it is not deployed.

Let me know your thoughts!