Managing Debian Software with APT (apt-get etc) |
Prev |
Home |
Next |
3.4 Upgrading packages
Package upgrades are a great success of the APT system. They can be achieved
with a single command: apt-get upgrade. You can use this command
to upgrade packages within the same distribution, as well as to upgrade to a
new distribution, although for the latter the command apt-get
dist-upgrade is preferred; see section Upgrading to a new release, Section 3.5 for more
details.
It's useful to run this command with the -u option. This option
causes APT to show the complete list of packages which will be upgraded.
Without it, you'll be upgrading blindly. APT will download the latest versions
of each package and will install them in the proper order. It's important to
always run apt-get update before you try this. See section Updating the list of available packages, Section 3.1.
Look at this example:
# apt-get -u upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages have been kept back
cpp gcc lilo
The following packages will be upgraded
adduser ae apt autoconf debhelper dpkg-dev esound esound-common ftp indent
ipchains isapnptools libaudiofile-dev libaudiofile0 libesd0 libesd0-dev
libgtk1.2 libgtk1.2-dev liblockfile1 libnewt0 liborbit-dev liborbit0
libstdc++2.10-glibc2.2 libtiff3g libtiff3g-dev modconf orbit procps psmisc
29 packages upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Need to get 5055B/5055kB of archives. After unpacking 1161kB will be used.
Do you want to continue? [Y/n]
The process is very simple. Note that in the first few lines,
apt-get says that some packages were kept back. This
means that there are new versions of these packages which will not be installed
for some reason. Possible reasons are broken dependencies (a package on which
it depends doesn't have a version available for download) or new dependencies
(the package has come to depend on new packages since the last version).
There's no clean solution for this first case. For the second case, it's
sufficient to run apt-get install for the specific package in
question, as this will download the dependencies. An even cleaner solution is
to use dist-upgrade. See section Upgrading to a new release, Section 3.5.
Managing Debian Software with APT (apt-get etc) |
Prev |
Home |
Next |