dpkg
package utilityAn application or utility program usually involves quite a few files. It might involve libraries, data files like game scenarios or icons, configuration files, manual pages 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.
Debian now supplies a tool named Apt (for "A Package Tool") to help the administrators to add or remove software more easily. Your first task will be to customize the /etc/apt/sources.list configuration file. This package resource list is used to locate archives of the package distribution system in use on the system. The source list is designed to support any number of active sources and a variety of source media. The file lists one source per line, with the most preferred source listed first. The format of a sources.list entry is:
deb uri distribution [component1] [component2] [...]
The URI for the deb type must specify the base of the Debian distribution, from which APT will find the information it needs. distribution can specify an exact path, in which case the components must be omitted and distribution must end with a slash (/). This is useful for when only a particular sub-section of the archive denoted by the URI is of interest. If distribution does not specify an exact path, at least one component must be present. The currently recognized URI types are cdrom, file, http, and ftp.
A few examples:
deb http://www.debian.org/archive stable main contrib
Uses HTTP to access the archive at www.debian.org, and uses the stable/main and stable/contrib areas.
deb ftp://ftp.debian.org/debian unstable main contrib non-free
Uses FTP to access the archive at ftp.debian.org, under the /debian directory, and uses the unstable/main, unstable/contrib and unsunstable/non-free areas.
deb ftp://ftp.debian.org/debian stable main
Uses FTP to access the archive at ftp.debian.org, under the /debian directory, and uses the stable/main area.
If this line appears as well as the one in the previous example in sources.list, a single FTP session will be used for both resource lines.
deb file:/home/vincent/debian stable main contrib non-free
Uses the archive stored locally (or NFS mounted) at /home/vincent/debian for stable/main, stable/contrib, and stable/non-free.
apt-get is the command-line tool for handling packages, and may be considered the user's "back-end" to apt. apt-get is very straightforward to use.
apt-get [options] [command] [package ...]
Where command is one of:
The most usefull options are:
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.
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.
What to do with this annoying stuff (wrapper packages, /usr/local)
Debian Tutorial
[email protected]