[back] [Copyright Notice] [Contents] [next]

Debian Tutorial - Chapter 16
Removing and installing software

This should be about Apt and dpkg

16.1 The dpkg package utility

16.2 What a package maintenance utility does

An application or utility program usually involves quite a few files. It might involve libraries, data files like game scenarios or icons, configuration files, and documentation. When you install the program, you want to make sure you have all the files you need in the right place.

You'd also like to be able to uninstall the program. When you uninstall, you want to be sure all the associated files are deleted. However, if a program you still have on the system needs those files, you want to be sure you keep them.

Finally, you'd like to be able to upgrade a program. When you upgrade, you want to delete obsolete files and add new ones, without breaking any part of the system.

The Debian package system solves these problems. It allows you to install, remove, and upgrade software packages, which are neat little bundles containing the program files and information that helps the computer manage them properly. Debian packages have filenames ending in the extension .deb, and they're available on the ftp site or on your official Debian CD-ROM.

16.3 Getting the files

Organization of the ftp site, CD

Mention non-us packages.

Describe stable vs. unstable distributions.

16.4 Using Apt

Help! I don't know how to use apt, so someone else has to write this.

16.5 Using dpkg manually

The simplest way to install a single package you've downloaded is the command dpkg -i (short for dpkg --install. Say you've downloaded the package icewm_0.8.12-1.deb and you'd like to install it. First log on as root, then type:

dpkg -i icewm_0.8.12-1.deb
and icewm version 0.8.12 will be installed. If you already had an older version, dpkg will upgrade it rather than installing both versions at once.

If you want to remove a package, you have two options. The first is most intuitive:

dpkg -r icewm
This will remove the icewm package (-r is short for --remove). Note that you give only the 'icewm' for --remove, while --install requires the entire .deb filename.

--remove will leave configuration files for the package on your system. A configuration file is defined as any file you might have edited in order to customize the program for your system or your preferences. This way, if you later reinstall the package, you won't have to set everything up a second time.

However, you might want to erase the configuration files too, so dpkg also provides a --purge option. dpkg --purge icewm will permanently delete every last file associated with the icewm package.

16.6 Compiling software yourself

You'll have to have -dev packages installed.

Put it in /usr/local, /opt, or your home directory.

The configure --prefix; make; make install routine.

16.7 Proprietary software not in .deb format

What to do with this annoying stuff (wrapper packages, /usr/local)

[back] [Copyright Notice] [Contents] [next]
Debian Tutorial
11 December 1998
Havoc Pennington hp@debian.org