Mennica Linuksa

How to fix Linux Mint not updating issue due to the broken packages

How to fix Linux Mint not updating issue due to the broken packages

Package management of Linux Mint is very stable, but it's not surprising to get into the issue of your Linux Mint not updating due to broke packages. The problem of broken packages even stops the installation of further program updates, which is not a good thing to happen considering the security loopholes patched daily.

Fix Linux Mint not updating due to broken packages error

In this article, we are going to discuss the causes of broken packages, and show you how to fix them on Linux Mint.

Case I: Unmet dependencies

It is the most common cause of your Linux Mint not getting updates, and the primary reason may be the unmet dependencies. When you install a program, it will also try to install the dependent programs and libraries. If these dependencies are not available to download for any reason such as a server is down or the libraries not maintained by the developer, the system gives off a 'broken packages' error.

Dependencies error

Fix:

Launch the Terminal and enter the following command:

sudo apt-get -f install

The above command installs all the dependencies of the broken package, provided the dependencies are available at the repo.

Installing dependencies though Terminal

In the other scenario where the dependencies are not available in the repositories, the sudo apt-get -f install command may not work. In this situation, you should remove the packages. We shall use the Synaptic Package Manager to do the job.

Broken packages error on Synaptic

Launch Synaptic Package Manager and select Status on the left panel and click on Broken Dependencies to find the broken package. Click on the red box to the left of the package's name, and you should get the option to remove it. Mark it for complete removal, and click on Apply on the top panel. The package should be removed.

Fixing broken packages on Synaptics

Removing Broken Packages from the Terminal

You can also remove broken packages from the Terminal. First, run the following command to check the broken packages:

sudo apt-get check

Detecting broken packages

You should get the list of broken packages. Now, assuming the package name is abc, run the following code:

sudo apt-get purge abc

For example, to fix the error in the above screenshot, I should use the command:

sudo apt-get purge ubports-installer

The program and all its configuration files should be removed.

Case II: Package installation error

If there is an error in the installation of any package, it should also return the same error.

Fix:

sudo apt --fix-broken install

The command should try to fix everything and should install/remove whatever that is necessary. Otherwise, you can again use the Synaptic Package Manager to fix it as described in the previous case.

Case III: Broken Repositories

The third cause may be broken repositories and generally occurs when sudo apt-get update is used. The repositories error can be caused due to several reasons, but the following solutions work well for all. To fix the issue, a simple program called YPPA Manager comes in handy.

Fix:

Run the following to install the program:

sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager

Now start YPPA Manager from the application menu, and provide the password. This window should show up:

Y PPA Manager

Click on Manage PPAs, and you should see a list of all repositories on your system. Now spot the one that was causing the error (from the update command) and purge it. Rerun the update, and the issue should be fixed.

Y-PPA repositories listing

Conclusion

That's all you ever need to fix the broken packages and fix the Linux Mint not updating issue. The first and second parts must generally fix everything as the repository error is rare and can be eliminated by paying attention to the quality of packages installed on your system. Usually, try to avoid the packages that are not maintained from the past six months or so to be on a safer side.

How was your experience in fixing the problem? Let us know in the comments below and if you like this article, don't forget to share it with your friends on social platforms.

Microsoft Sculpt Touch Wireless Mouse Review
I recently read about the Microsoft Sculpt Touch wireless mouse and decided to buy it. After using it for a while, I decided to share my experience wi...
AppyMouse On-screen Trackpad and Mouse Pointer for Windows Tablets
Tablet users often miss the mouse pointer, especially when they are habitual to using the laptops. The touchscreen Smartphones and tablets come with m...
Middle mouse button not working in Windows 10
The middle mouse button helps you scroll through long webpages and screens with a lot of data. If that stops, well you will end up using the keyboard ...