Chapter 7. The Debian package management tools
36
Configure a package that already has been unpacked:
dpkg configure foo
.
Among other things, this action runs the postinst (see `What is a Debian preinst, postinst,
prerm, and postrm script?' on page
28
) script associated with the package. It also updates
the files listed in the
conffiles
for this package. Notice that the 'configure' operation
takes as its argument a package name (e.g., foo), not the name of a Debian archive file
(e.g., foo_VVV RRR.deb).
Extract a single file named blurf (or a group of files named blurf* from a Debian
archive:
dpkg fsys tarfile foo_VVV RRR.deb | tar xf blurf*
Remove a package (but not its configuration files):
dpkg remove foo
.
Remove a package (including its configuration files):
dpkg purge foo
.
List the installation status of packages containing the string (or regular expression)
foo* :
dpkg list 'foo*'
.
7.1.2 APT
APT is the Advanced Package Tool and provides the
apt get
program.
apt get
provides a
simple way to retrieve and install packages from multiple sources using the command line.
Unlike
dpkg
,
apt get
does not understand .deb files, it works with the packages proper
name and can only install .deb archives from a source specified in
/etc/apt/sources.list
.
apt get
will call
dpkg
directly after downloading the .deb archives
1
from the configured
sources.
Some common ways to use
apt get
are:
To update the list of package known by your system, you can run:
apt get update
(you should execute this regularly to update your package lists)
To upgrade all the packages on your system, run:
apt get upgrade
To install the foo package and all its dependencies, run:
apt get install foo
To remove the foo package from your system, run:
1
Notice that there are ports that make this tool available with other package management systems, like Red
Hat package manager, also known as
rpm
<
New Page 1
Web Hosting Colorado