apt-get
provides a simple way to install packages from the command
line. Unlike dpkg
, apt-get
does not understand .deb
files, it works with the package's proper name and can only install .deb
archives from a Source.
The first [1] thing that should be
done before using apt-get
is to fetch the package lists from the
Sources so that it knows what packages are available. This is done
with apt-get update. For instance,
# apt-get update Get http://ftp.de.debian.org/debian-non-US/ stable/binary-i386/ Packages Get http://llug.sep.bnl.gov/debian/ testing/contrib Packages Reading Package Lists... Done Building Dependency Tree... Done
Once updated there are several commands that can be used:
dselect
or apt-get
install can be used to force these packages to install.
dselect
. Once dist-upgrade has completed then
dselect
can be used to install any packages that may have been
left out.
It is important to closely look at what dist-upgrade is going to do, its decisions may sometimes be quite surprising.
apt-get
has several command line options that are detailed in its
man page, apt-get(8)
. The most useful option is -d
which does not install the fetched files. If the system has to download a
large number of package it would be undesired to start installing them in case
something goes wrong. When -d is used the downloaded archives can
be installed by simply running the command that caused them to be downloaded
again without -d.
APT User's Guide
$Id: guide.sgml,v 1.7 2003/04/26 23:26:13 doogie Exp $jgg@debian.org