1. Home
  2. Linux
  3. Fix broken packages on debian

How to fix broken packages on Debian

When using Debian Linux, you may find yourself downloading DEB packages from the internet to install the software you need to use. Much like Ubuntu Linux, developers that focus on Debian often don’t bother setting up dedicated software repositories and give out packages for users to download and install.

Most DEB packaged software that is available online can be downloaded on Debian, and works just fine when installed. However, sometimes these downloadable DEB packages go long periods of time without software updates or patches which creates broken packages on Debian.

Note: In this guide, we’re focusing on how to take care of broken packages on Debian Linux. With that said, if you run Linux Mint Debian Edition, MxLinux, BunsenLABs Linux or another Debian-based operating system, feel free to follow along. All of the information we cover in here for Debian pertains to those OSes as well!

Install Synaptic package manager

The primary graphical way of installing software on Debian Linux is the Synaptic package manager. One of the reasons that this piece of software is often included in various releases of Debian is that it comes with built-in features that can help users quickly mitigate broken packages on the system.

Most of the time, Synaptic is pre-installed. However, it may not be installed on your release of Debian (especially if its a derivative) so, we’ll briefly go over how to get the program installed before going over how to use it to fix broken packages.

To start the installation of Synaptic package manager on Debian Linux, you’ll need to open up a terminal window. To do this, press Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. From there, use the Apt or Apt-get installation commands below.

First, run the update and upgrade commands on Debian Linux, to ensure that your system has all pending software patches fully set up.

sudo apt update

sudo apt upgrade

Or, if you’re on a release of Debian Linux that doesn’t have access to Apt, try Apt-get.

sudo apt-get update
sudo apt-get upgrade

Now, use the package manager to install the Synaptic package manager on Debian.

sudo apt install synaptic -y

Or, on releases of Debian without Apt, try:

sudo apt-get install synaptic -y

Alternatively, if you’re not a fan of the terminal on Debian, open up Gnome Software, or KDE discover and update your system using the built-in update mechanism they provide. Then, type in “synaptic,” click the “Install” button and get the software up and running that way.

Find broken packages on Debian with Synaptic

To find a broken package on Debian with the Synaptic package manager, start by launching the application. As it opens, enter your user’s password to gain access to the program.

Note: If your Debian Linux PC doesn’t use sudo, try launching it with the terminal command below instead.

su -

synaptic

With the Synaptic package manager open and ready to use, look for the blue search icon and click on it with the mouse. Doing this will bring up a search box. Use it to write in the name of the package(s) you know are broken, and press the “search” button to start a search.

In the search results, look to the left-hand side-bar of Synaptic. Next, to any broken packages, a red square will appear.

Sort by broken

There may be multiple broken packages on your Debian PC that you’re unable to find due to not knowing the exact names. Luckily, the Synaptic package manager lets users sort packages by status, including “broken.”

To filter out packages that are broken, make your way to the bottom-left section of the app, and click the button with the “Custom Filters” label. In the filter area, look for the “Broken” one and select it with the mouse.

Selecting the “Broken” filter in Synaptic will automatically show all broken packages that are currently installed on your Debian Linux PC.

Fix broken packages using Synaptic

To get rid of broken packages in the Synaptic package manager, ensure that the app is open and the packages are sorted by broken, or that you’ve searched for the ones that need fixing. Then, locate the “Edit” button at the top of the app, and select it with the mouse to reveal its contents.

Inside of the “Edit” menu, find the “Fix Broken Packages” button and select it. As soon as you select this option, Synaptic will automatically assign fixes to all of the broken packages, such as removing them, installing missing files, etc. Then, find the “Apply” button and click it to apply the fixes.

When Synaptic finishes correcting all of the broken packages on your Debian PC, close the app and everything should be in working order!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.