How to Fix Package is in a Very Bad Inconsistent State Error?

Stuck in a situation where you are not able to remove packages from your system due to an inconsistent state error, then let me guide you through the steps to resolve this issue. 

While working on the terminal, you may get into several types of errors, like unmet dependencies, when the package is not able to find the dependencies for the required application and fails to install it.

Like this error, there is one more error: “package is in a very bad inconsistent”.

This error occurs on your system when there is a problem with a package manager and the system is unable to properly handle the installation or removal of packages. 

The main causes of this error can vary from user to user, like interruptions during package installation, dependency issues, conflicts with packages, keyring issues, and so on.

But don’t worry! You can solve this problem very easily with the steps that I’m sharing with you.

So, now you just need to stick with us to resolve the error.

How to Resolve Package is in a Very Bad Inconsistent State Error

There are three different methods available to solve this problem, and you can choose any one to fix it, but I suggest you try the first one to resolve the error.

I’d like to tell you one thing before moving ahead is to make sure your internet is consistent while the package is getting installed so you don’t encounter any interruptions during the process.

📝 Quick Recap

🔗

To solve this problem, you need to run a few commands to forcefully remove the conflicting packages from the system.

After removing the conflicting package, you can try to install the package.

🚀 Method 1

$ sudo dpkg --remove --force-remove-reinstreq <conflicting-package-name>
$ sudo apt install <package-name>

🚀 Method 2

$ sudo rm -rf /var/lib/dpkg/info/<package-name>.*
$ sudo dpkg --remove --force-remove-reinstreq <conflicting-package-name>
$ sudo apt autoremove && sudo apt autoclean
$ sudo apt-get install <package-name>

1

Resolve Package is in a Very Bad Inconsistent State Error

As I said earlier, due to some conflicts with the package manager, you are not able to install packages into your system, so first we will carefully & forcefully remove the package from your Ubuntu or Debian-based machine, and then we will try to install the application again.

Now open your system terminal and execute the following line of command by replacing the package name that has caused the issue:

$ sudo dpkg --remove --force-remove-reinstreq <conflicted-package-name>

If you are not aware of this flag, then let me tell you what it is.

  • --remove : It tells dpkg pakage to remove the package.
  • --force-remove-reinstreq : With the help of this flag, dpkg will remove the application that is in the reinstreq (required install) state, where dpkg won’t allow you to remove the application unless you force it.

Once you’re done with the above step, move on to the next step to install the application.

$ sudo apt install <package-name>

After following this step, if you get into the same situation again, try to install the package from the source or from the binary file.

2

Resolve Package is in a Very Bad Inconsistent State Error

It’s okay if the above didn’t work out in your system. You still have a couple of troubleshooting steps to take to solve this problem, and more importantly, I’m with you.

So now go to your terminal and type the following command to remove the package information of the conflicting package:

$ sudo rm -rf /var/lib/dpkg/info/<package-name>.*

After removing the package information from /var/lib/dpkg/info, you need to run the next line of command to forcefully remove the conflicted package and clean up the system from unnecessary files and dependencies. 

$ sudo dpkg --remove --force-remove-reinstreq <conflicted-package-name>
$ sudo apt autoremove && sudo apt autoclean

The next and final step is to reinstall the package with the below command:

$ sudo apt install <package-name>

3

Resolve Package is in a Very Bad Inconsistent State Error

There might be some issue at the repository or the PPA due to that installation failing again and again.

In such a situation, you can try to install the respective package from the Snap or Flatpak package manager, or else get binary files. 

If you are comfortable compiling and installing applications from source, then that can be your best bet.

Wrap up

That’s all for this guide, where you learned how to fix the package is in a very bad inconsistent state error on your Ubuntu or Debian-based machine.

Before signing of I like to share my personal incident with this error.

I faced a similar issue when I was trying to install ONLYOFFICE document-server on my Ubuntu machine, so whenever I try to install it fails due to missing GPG keys, and in the end I get the “inconsistent state error.”

Also Read: Simple and Easy way to resolve Sub-process /usr/bin/dpkg returned an error code (1)

However, I fixed the issue by manually grabbing the key.

Now the same incidents can happen at your end too, so please check what is causing the exact problem, and you will be able to fix it.

Anyway, if you are still facing the issue, then just drop your concern below.

See you in the next article…

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments