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

APT User's Guide - Chapter 2
apt-get


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 packages 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/ frozen/contrib Packages
Reading Package Lists... Done
Building Dependency Tree... Done

Once updated there are several useful commands that can be used,

upgrade
Upgrade will attempt to gently upgrade the whole system. Upgrade will never install a new package or remove an existing package, nor will it ever upgrade a package that might cause some other package to break. This can be used daily to relatively safely upgrade the system. Upgrade will list all of the packages that it could not upgrade, this usually means that they depend on new packages or conflict with some other package. Dselect or apt-get install can be used to force these packages to install.

install
Install is used to install single packages sport agents.

As an added complication there is the possibility for a package to pretend to be another package. Consider that exim and sendmail for many intents are identical, they both deliver mail and understand a common interface. Hence, the package system has a way for them to declare that they are both mail-transport-agents. So, exim and sendmail both declare that they provide a mail-transport-agent and other packages that need a mail transport agent depend on mail-transport-agent. This can add a great deal of confusion when trying to manually fix packages.

At any given time a single dependency may be met by packages that are already installed or it may not be. APT attempts to help resolve dependency issues by providing a number of automatic algorithms that help in selecting packages for installation.


[Abstract] [Copyright Notice] [Contents] [next]
APT User's Guide
$Id: guide.sgml,v 1.2 1998/11/23 01:15:59 jgg Exp $
Jason Gunthorpe jgg@debian.org
usr/doc/apt/users-guide.html/ch2.html100644 0 0 7533 6756600714 16063 0ustar rootroot