APT and RPM Packager Lookup Tables

apt-get versus aptitude

Before we get started there is an APT issue that comes up a lot: apt-get verses aptitude. apt-get is older, aptitude is newer and arguably nicer. Pick one and stick to it. Choose aptitude if you have no good reason to use apt-get. Having said that I am not aware of an official answer, the closest I know of is: Idea #4935: Ubuntu should explain apt-get versus aptitude.

Packager Lookup Table

This is intended as a lookup table to allow someone familiar with one package tool to figure out how to do things in another one. It's not a feature comparison per se, thought it looks like one.

It's also not intended to settle any package manager wars. After working with RPM for several years, then switching to Debian and Ubuntu, I prefer APT over RPM. But many of the perceived strengths of APT are actually more due to Debian policy than technical superiority. Prior to the advent of yum, APT was clearly superior. Post-yum, you can argue either way, though as I said I prefer APT these days.

See also:http://maketecheasier.com/become-an-apt-guru/2009/02/24.

This table is partly derived from the following:

Command APT YUM RPM
Meaning Advanced Package Tool Yellow dog (Linux) Updater, Modified Red Hat Package Manager
File Extension *.deb *.rpm *.rpm
(Remote) Repository location config /etc/apt/sources.list /etc/yum.conf N/A
Update package index or header files from remote sources aptitude update
(apt-list update)
N/A (yum does this every time it's run, use -C to avoid this slow behavior) N/A
Install new packages aptitude install [args] yum install [args] rpm -Uvh [args]
Remove packages aptitude remove [args] yum remove [args] rpm -e [args]
Find packages that you can install apt-cache search [args] yum search [args] N/A
Show information about a package that is not installed [1] apt-cache show [args] yum list [args] rpm -qip [args]
Show information about an installed package apt-cache show [args] yum info [args] rpm -qi [args]
List the contents (files) of a package that is not installed [1] dpkg -L [args]
(apt-file show [args])
rpm -qlp [args]
List the contents (files) of an installed package dpkg -L [args]
(apt-file show [args])
rpm -ql [args]
Check for upgrades aptitude -s upgrade
apt-get -s dist-upgrade
yum check-update N/A
Upgrade packages aptitude dist-upgrade yum update rpm -Uvh [args]
Upgrade entire system aptitude dist-upgrade yum upgrade N/A
Show the package to which a file belongs dpkg-query -S
(apt-file search )
yum provides
yum whatprovides
rpm -q --whatprovides
Remove packages from the local cache directory aptitude clean yum clean packages N/A
Remove only obsolete packages from the local cache directory aptitude autoclean N/A N/A
Remove header files from the local cache directory, forcing a new download of same on next use apt-file purge yum clean headers N/A
Remove obsolete header files from the local cache directory N/A yum clean oldheaders N/A
Run yum clean packages and yum clean oldheaders N/A yum clean all N/A
Show stats about the package cache apt-cache stats
Show the packages a given package depends on apt-cache depends
Show other packages that depend on a given package (reverse dependency) apt-cache rdepends rpm -q -whatrequires [args]
Show information about the packages apt-cache showpkg [args]
Show the names, version and other information for all installed packages dpkg -l rpm -qa
Verify all installed packages debsums rpm -Va
Show what has been changed in a new version of a package apt-listchanges rpm -q -changelog [args]
Lists available package versions with distribution apt-show-versions
Query the package database dpkg-query rpm -q
Show the list of all the packages in the cache apt-cache pkgnames

Notes:

  • See the specific man pages for each command as this table only scratches the surface.
  • Some of these commands may only be similar at a very high level.
  • For many of the Debian commands, [args] can be a regular expression describing what you're looking for.
  • [1] RPM requires that the package specified by -p exist in the local file system. In other words, you have to download it first. Apt-get and Yum do not share this requirement.

Apt Related Tools

So having said all of that, the downside to apt and friends is that apt has so many friends. The following table is a list of all the friends of apt I'm aware of. There's probably at least a few missing.

The tools in bold are frequently used by system administrators.

If this list seems absurd to you, I have to agree. It's a bit of an embarrassment of riches, to say the least. You may find one of these wrappers of interest:

Program Description/Use
approx [Not installed by default] caching proxy system for Debian package and source files [See also apt-cacher, apt-proxy]
apt-cache APT package handling utility -- cache manipulator
apt-cacher [Not installed by default] caching proxy system for Debian package and source files [See also approx, apt-proxy]
apt-cdrom APT CDROM management utility to add new CDs to the sources list
apt-config [Internal] APT Configuration Query program
apt-extracttemplates Utility to extract DebConf config and templates from Debian packages
apt-file APT package searching utility
apt-ftparchive Utility to generate index files
apt-get APT package handling utility -- command-line interface [use aptitude instead]
aptitude Successor to apt-get, and now recommended instead of apt-get. Command line and curses "GUI" interface all in one.
apt-key APT key management utility
apt-listchanges Display change history from .deb archives
apt-proxy [Not installed by default] Debian archive proxy and partial mirror builder [See also approx, apt-cacher]
apt-proxy-import [Not installed by default] Import packages into the apt-proxy cache
apt-proxy-v1tov2 [Not installed by default] Updates apt-proxy configuration to the new format
apt-sortpkgs Utility to sort package index files
debconf Debian configuration management system
debconf-apt-progress Install packages using debconf to display a progress bar
debconf-communicate Communicate with debconf
debconf-copydb Copy a debconf database
debconf-escape Helper when working with debconf's escape capability
debconf-getlang Extract a language from a templates file
debconf-get-selections Output the current debconf database in a format understandable by deb-conf-set-selections
debconf-loadtemplate Load template file into debconf database
debconf-mergetemplate Merge multiple debconf template files
debconf-set-selections Insert new default values into the debconf database
debconf-show Query the debconf database
deborphan [Not installed by default] Find orphaned libraries
dpkg Package maintenance system for Debian
dpkg-awk Gawk script to parse /var/lib/dpkg/{status,available} and Packages
dpkg-cross Tools for cross compiling Debian packages
dpkg-deb Debian package archive (.deb) manipulation tool
dpkg-dev Package building tools for Debian
dpkg-dev-el Emacs helpers specific to Debian development
dpkg-divert Override a package's version of a file
dpkg-ftp Ftp method for dselect
dpkg-multicd Installation methods for multiple binary CDs
dpkg-preconfigure Let packages ask questions prior to their installation
dpkg-query A tool to query the dpkg database
dpkg-reconfigure Reconfigure an already installed package
dpkg-repack Puts an unpacked .deb file back together
dpkg-ruby Ruby interface for dpkg
dpkg-sig Create and verify signatures on .deb-files
dpkg-split Debian package archive split/join tool
dpkg-statoverride Override ownership and mode of files
dpkg-www Powerful WEB based Debian package browser
dselect An older apt interface [see aptitude or synaptic]
localepurge [Not installed by default] Automagically remove unnecessary locale data
synaptic A newer apt interface (GUI)