If you run Debian or one of its derivatives like Linux Mint or Ubuntu, sooner or later you come across apt-get and dpkg, the main commands for package management. However, these are only the most common Debian package tools. Over the years, Debian has evolved literally dozens of scripts and tools to make installing and configuring packages easier.
Many of these scripts and tools aid in creating packages. However, many are useful for everyday users, too. Often, they include features you simply won't find in desktop tools.
Here are nine of the most useful package management tools in Debian. Most should be available in Debian-derivatives as well:
Aptitude is best-known as a text-based tool for package management. Desktop tools may be more in keeping with modern expectations, yet Aptitude remains so useful that it is often installed by default.
Aptitude is also useful when you are trying to fix broken packages that are preventing you from installing or removing anything else. Useful features include the why command, which shows the other packages dependent on a package, and why-not, which shows what packages conflict with the one specified. In addition, the Resolver menu lists possible solutions to broken packages, starting with the least disruptive one.
Apt-cache searches the database of installed packages for information. It can show information about individual packages, dependencies, and conflicts, and much more.
An especially useful command is
apt-cache search, which searches for strings of text in the database. Using this command, you can find the exact name of a package so that you can install it, as well as related packages that you might want to install. In Debian, it is essential enough to be installed by default.
Dpkg-reconfigure alters how packages are installed. For example, you can use it to set what sort of questions you are asked when a package installs, reset the priority of a question, or to force installation even though the package is broken.
Time was when dpkg-reconfigure could be used to configure almost every part of a Debian-based system. As other tools have emerged to configure an installation, much of its versatility has fallen away, yet dpkg- reconfigure can still be used to configure such features as time zones, video drivers, printers, and scanners. Ubuntu deprecates dpkg- reconfigure, but it can still be useful in other Debian-based distributions.
Today, the speed of Internet connections is often fast enough that nobody worries about it. However, the fact remains that some package repositories are faster than others, and that popular ones can slow down during peak hours of usage. Sometimes, too, a high-speed connection is simply unavailable.
As you probably know, Tor is a tool for anonymous browsing. However, even if you are security conscious, you may not stop to think that downloading packages might allow others to track your activities back to your system.
Apt-transport-tor allows you to close this security gap by routing your package management through Tor.
If you are security conscious, or simply wanting the latest packages, cron-apt can help you keep up to date. As its name implies, cron-apt schedules regular downloads for your system, and notifies you of the available updates. Users tend to update once a day.
However, note that cron-apt downloads but does not install updated packages. This limitation is deliberate, because installing everything unattended can be a good way to cause system problems. After checking what is available, you can install upgraded packages manually, or, if you see no problems, simply with
Usually, you can gauge the reliability of a package simply by whether it is in Debian's Stable, Testing, or Unstable repository. However, Debian- derivatives often lack this guide, and it always advisable to have the latest information.
Apt-listbugs displays the latest information about a package from the Debian Bug Tracking System. Its results can be filtered by priority, allowing you to choose your level of risk. Running it before installing with apt-get can go a long way towards minimizing problems on your system, especially if you dip into the Unstable or Experimental package repositories.
None of these tools is absolutely essential for Debian package management. Many users get by handily with nothing but apt-get and an occasional venture into dpkg to purge a package from the system or install a manually downloaded package.
However, all are convenient. Used sensible, they can save time and effort, and some can help you avoid common problems. Decide what your needs are, and choose the ones that best suit you.