A Guide to Linux Package Systems
Posted by: Rea Maor In: Linux and Unix - Saturday, September 8th, 2007Newcomers to Linux frequently voice some confusion over the various software package formats. There’s a lot of available research out there, but here’s a quick user-friendly guide.
What is a package system? - Just a way to install a program! Instead of providing a source code tarball and expecting the end user to know what to do with it, a pre-compiled binary package will have all of the components of the program wrapped up together with a script program which tells the end system what to do with it.
The main package systems, and which distros use them, are:
- deb - Stands for “Debian”; used by Debian and all distributions derived from Debian, such as Ubuntu. Debian was the first distro to have package management which used dependency resolution. Programs which handle .deb’s are dpkg (command-line), apt-get (command-line script), aptitude (curses interface), and synaptic (full GUI interface).
- .rpm - Stands for “Red Hat Package Manager”; used by Red Hat, Fedora, and all systems derived from them. The programs which handle these packages will usually be rpm (command-line), yum (command-line wrapper), and Anaconda (full GUI).
- .tgz - Mainly used by Slackware and other distros which come from Slackware. The .tgz format is actually as bare-bones as you can get; it’s a step removed from plain tar archives. The tools for it are installpkg (command-line), and pkgtool (a curses interface). GUI interface? Who needs it; you’re a Slackware hacker! But other third-party tools exist, such as slapt-get, slack-package, and swaret.
- .urpmi - This is the Mandriva extended scheme for Red Hat style rpm’s. So it’s used by Mandriva and derivatives thereof such as PCLinuxOS. Its tools are urpmi (command-line), gurpmi (a modest GUI), and rpmdrake (a full GUI interface).
- “other” - These include everything from .pup files for Puppy Linux to Damn Small Linux’s .dsl’s to Pacman for Arch Linux. There’s several small distros out there that just go off and do their own thing.
What is dependency resolution and why is it such an issue? - Let’s say I wrote a script which uses ImageMagick to generate a random desktop background image. My script now depends on ImageMagick, and in addition if it’s a Bash script it will depend on utilities like Bash and probably sed, awk, echo, and other programs. These dependencies wouldn’t be an issue for bash, sed, awk, etc., since they are common. But not all distros include ImageMagick by default. Whatever package manager I release my script for, the user has to be sure the depended-on programs are there or else my script won’t work.
Similar situations are encountered everywhere in software. Regardless if it is Windows, Mac, Linux, BSD, Solaris, or whatever, every software program depends on numerous other programs to get its work done, with the exception of the operating system kernel itself. To do otherwise would be insane; what would the auto industry be like if every time you designed an air filter, you had to reinvent the car?
I want to get this program; which package manager is it most likely to use? - All major software developers release their programs in multiple package formats, or else with a bundled installer. In case you have a small program that’s only using one system, you could probably find it in a Debian archive. Debian has the largest package base by far; after that there’s the Red Hat/Fedora archive, then Slackware .tgz’s, and after that you must have something really obscure.
The package isn’t available for my system, does that mean I can’t get this program? - No matter what, if it’s available for Linux it should be available in source form. Source code may be a pain, but it is the universally portable software form! Besides that, there is the mighty Alien program, which converts between all three major package formats (deb, rpm, tgz). Using Alien with one of those three package formats, you will have free access to 99.999% of the Linux programs out there.
Happy Linuxing!
Related Posts:
- What Your Linux Distro Says About You
- Linux Link-O-Mania
- Shell Programming
- Fixing Windows using a Live Linux CD - part one
- Fixing Windows using a Live Linux CD - part two






