Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Managing Debian Software with APT (apt-get etc)
Prev Home Next

3.5 Upgrading to a new release

This feature of APT allows you to upgrade an entire Debian system at once, either through the Internet or from a new CD (purchased or downloaded as an ISO image).

It is also used when changes are made to the relationships between installed packages. With apt-get upgrade, these packages would be kept untouched (kept back).

For example, suppose that you're using revision 0 of the stable version of Debian and you buy a CD with revision 3. You can use APT to upgrade your system from this new CD. To do this, use apt-cdrom (see section Adding a CD-ROM to the sources.list file, Section 2.4) to add the CD to your /etc/apt/sources.list and run apt-get dist-upgrade.

It's important to note that APT always looks for the most recent versions of packages. Therefore, if your /etc/apt/sources.list were to list an archive that had a more recent version of a package than the version on the CD, APT would download the package from there.

In the example shown in section Upgrading packages, Section 3.4, we saw that some packages were kept back. We'll solve this problem now with the dist-upgrade method:

     # apt-get -u dist-upgrade
     Reading Package Lists... Done
     Building Dependency Tree... Done
     Calculating Upgrade... Done
     The following NEW packages will be installed:
       cpp-2.95 cron exim gcc-2.95 libident libopenldap-runtime libopenldap1
       libpcre2 logrotate mailx 
     The following packages have been kept back
       lilo 
     The following packages will be upgraded
       adduser ae apt autoconf cpp debhelper dpkg-dev esound esound-common ftp gcc
       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 
     31 packages upgraded, 10 newly installed, 0 to remove and 1 not upgraded.
     Need to get 0B/7098kB of archives. After unpacking 3118kB will be used.
     Do you want to continue? [Y/n]

Note now that the packages will be upgraded, and new packages will also be installed (the new dependencies of the packages). Note too that lilo is still being kept back. It probably has a more serious problem than a new dependency. We can find out by running:

     # apt-get -u install lilo
     Reading Package Lists... Done
     Building Dependency Tree... Done
     The following extra packages will be installed:
       cron debconf exim libident libopenldap-runtime libopenldap1 libpcre2
       logrotate mailx 
     The following packages will be REMOVED:
       debconf-tiny 
     The following NEW packages will be installed:
       cron debconf exim libident libopenldap-runtime libopenldap1 libpcre2
       logrotate mailx 
     The following packages will be upgraded
       lilo 
     1 packages upgraded, 9 newly installed, 1 to remove and 31 not upgraded.
     Need to get 225kB/1179kB of archives. After unpacking 2659kB will be used.
     Do you want to continue? [Y/n]

As noted in the above, lilo has a new conflict with the package debconf-tiny, which means it couldn't be installed (or upgraded) without removing debconf-tiny.

To know what's keeping or removing a package you may use:

     # apt-get -o Debug::pkgProblemResolver=yes dist-upgrade
     Reading Package Lists... Done
     Building Dependency Tree... Done
     Calculating Upgrade... Starting
     Starting 2
     Investigating python1.5
     Package python1.5 has broken dep on python1.5-base
       Considering python1.5-base 0 as a solution to python1.5 0
       Holding Back python1.5 rather than change python1.5-base
     Investigating python1.5-dev
     Package python1.5-dev has broken dep on python1.5
       Considering python1.5 0 as a solution to python1.5-dev 0
       Holding Back python1.5-dev rather than change python1.5
      Try to Re-Instate python1.5-dev
     Done
     Done
     The following packages have been kept back
       gs python1.5-dev 
     0 packages upgraded, 0 newly installed, 0 to remove and 2  not upgraded.

This way, it's easy to notice that the python1.5-dev package cannot be installed because of an unsatisfied dependency: python1.5.


Managing Debian Software with APT (apt-get etc)
Prev Home Next

 
 
  Published under the terms of the GNU General Public License Design by Interspire