April 24, 2019

Linux Package Management: Keeping Up with the Times - page 3

Introduction to Package Types

  • April 22, 2002
  • By Dee-Ann LeBlanc

Debian's package management system is a bit more specialized, with a series of commands that together provide the same functions as RPM, and moreso. The key package management components of the Debian system are:

apt-cdromA shortcut for apt-get when the packages to install are on a CD-ROM.
apt-getDebian package installer where the location to get the files is stored in a specific configuration file, /etc/apt/sources.list.
dpkgThe Swiss army knife of the Debian package management toolset. Use to install, get information about, or uninstall a Debian package.
dpkg-debWork with the contents of a Debian package.
dpkg-ftpA shortcut for dpkg where the packages to install are on a specific FTP site.
dselectA menu-driven nongraphical interface for working with Debian packages.

To accomplish the same things with .deb packages that we did earlier with RPM's, do the following:

Command ExampleDescription
dpkg -l | more
List all installed Debian packages, displaying them one screen at a time.
dpkg -L perl
List all of the files added to the filesystem when I installed the Perl package, and where they were placed.
dpkg-deb --contents perl-5.005_5.005.03-7.1.deb
List all of the files and where they will be added to the filesystem if I install the Perl package specified.
dpkg --info perl
Display information about the Perl package I installed.
dpkg --info perl-5.005_5.005.03-7.1.deb
Display information about the Perl package I'm thinking about installing.
dpkg --install perl-5.005_5.005.03-7.1.deb
Install this Perl package, or upgrade it if it's already installed.
dpkg --force-conflicts perl-5.6.1.i386.deb
Install this Perl package even if I'm getting errors about conflicts or versions. Also, give verbose output, and display hashes to show me progress.
dpkg -r perl
Uninstall the Perl package.

A favorite Debian package management tool is apt-get. This is a wonderfully smart program that lets you do away with those nasty long filenames and also goes out and grabs the item you need for you. First you have to run the apt-setup utility so you've got the apt program properly configured (c'mon, it's not psychic). Once you've done that, you can do cool things like type the following to get the latest list of packages available:

apt-get update

Then you type the following to download any new versions of what you have installed:

apt-get upgrade

To install something you don't already have, it's something like:

apt-get install kde

Mainstream distributions that utilize the Debian package system include Debian (obviously) and SuSE.

Most Popular LinuxPlanet Stories