System
Difficulty: Beginner
3 min read

Apt-Listbugs: Avoid Buggy Updates

Complete guide to install and use apt-listbugs in order to avoid installing packages with critical bugs on a Debian or Ubuntu system.

Back to tutorials
What is apt-listbugs?
apt-listbugs is a tool that integrates with apt to check the critical bug reports (Critical, Grave, Serious) of a package before its installation or upgrade. It helps you avoid installing a version of a piece of software known to cause major problems.

Why Use apt-listbugs?

  • System stability: Prevents the installation of updates that could break your system.
  • Informed decision-making: Notifies you of the risks before you confirm an update.
  • Security: A bug can sometimes be a security vulnerability. Being informed is the first step toward prevention.

Prerequisites

  • Operating system: Debian, Ubuntu or a derived distribution.
  • Privileges: Root access or sudo privileges.

Installation

Installation is very simple and is done through the official repositories:

sudo apt-get update
sudo apt-get install -y apt-listbugs

Once installed, it will activate automatically. On your next apt upgrade or apt install command, it will kick in if necessary.

Typical Usage

When you run an update, if a package is affected by a serious bug, apt-listbugs will interrupt the process and present you with a report.

sudo apt-get upgrade

Sample Output

You will see a list of bugs for each affected package. After the list, an interactive menu will ask you what to do:


Reading changelogs... Done
Retrieving bug reports... Done
Parsing bug reports... Done
Critical bugs of libc6 (2.31-13+deb11u2 -> 2.31-13+deb11u3) 
 #123456 - libc6: segmentation fault on starting any process
Summary:
 libc6(1 bug)
Are you sure you want to install/upgrade the above packages? [Y/n/?]

The Possible Choices

  • `y` (yes): Ignore the bug and install the update (not recommended for critical bugs).
  • `n` (no): Cancel the installation or upgrade of THIS package. apt will continue with the other non-problematic packages.
  • `p` (pin): "Freeze" the package version. apt will ignore this package during future updates until you manually unblock it. This is often the best choice.
  • `?`: Displays the help.
Pinning
Choosing `p` is a safe solution. The package is put on "hold". You can see held packages with dpkg --get-selections | grep hold.

Checking Bugs Manually

You can also query apt-listbugs for a specific package without running an update.

# Check the bugs for the nginx package
apt-listbugs list nginx

# Check the bugs for a specific version from a .deb file
apt-listbugs list /path/to/package.deb

Configuration

The main configuration file is /etc/apt/apt.conf.d/10apt-listbugs.

You can, for example, change the severity levels that trigger an alert:

# /etc/apt/apt.conf.d/10apt-listbugs
APT::Listbugs::Severities "critical,grave,serious";

You could add important if you want to be even more cautious.

Don't ignore blindly
The goal of apt-listbugs is to make you think. At the very least, read the bug title before deciding to install a package that is critical to your system.

Conclusion

apt-listbugs is a simple but extremely powerful tool for maintaining the stability of Debian/Ubuntu-based servers or workstations. In just a few minutes, it adds an essential layer of protection against software regressions. It is a "must-have" for any serious system administrator.

Written by

Morgann Riu

Cybersecurity and Linux administration expert. I share my knowledge through free tutorials and training to help system administrators and developers secure their infrastructures.

Frequently asked questions

My apt upgrade stopped on a bug report, what should I answer?
At the very least, read the bug title before deciding — that is the whole point of the tool. Answering n cancels the upgrade of that single package and lets apt proceed with the rest, which unblocks the overall update without taking any risk. Answering p goes further and pins the package for subsequent updates as well. Only answer y if you have read the bug and concluded that it does not affect you.
What is the difference between answering n and answering p?
n only applies to the current run: the package is skipped this time, but it will be offered again on the next apt upgrade and you will see the same report. p puts the package on hold: its version is frozen and apt will ignore it during future updates until you unblock it manually. For a bug that will take a while to be fixed upstream, p is the durable answer.
How do I know which packages are currently pinned?
The command dpkg --get-selections | grep hold lists every package marked as hold, whether it was put there by apt-listbugs or manually. This is the reflex to have when an expected update never happens: a package left pinned after the bug has been fixed silently blocks all of its later versions.
Can I check a package for bugs before running an upgrade?
Yes, the tool also works in manual mode, without going through apt. apt-listbugs list nginx shows the known bug reports for the nginx package. You can also target a downloaded file with apt-listbugs list /path/to/package.deb, which is handy before installing a .deb obtained outside the repositories.
How do I get warned about less severe bugs, or be interrupted less often?
It all happens in /etc/apt/apt.conf.d/10apt-listbugs, through the APT::Listbugs::Severities directive. The default value is "critical,grave,serious". Add important to the list for a more cautious policy on a sensitive server, or remove levels if the interruptions become too frequent on a workstation.

Share this tutorial

Did you enjoy this article?

Comments

Checklist Sécurité Linux

30 points essentiels pour sécuriser un serveur Linux. Recevez aussi les nouveaux tutoriels par email.

Pas de spam. Désabonnement en 1 clic.