Upgrade Debian release 7.11 (wheezy) to 8.5 (jessie)

5,081

Upgrading to Debian 8 Jessie is more complicated than simply running dist-upgrade. I’ll summarise the steps involved but I’d strongly suggest that you fully familiarise yourself with Upgrades from Debian 7 (wheezy) from the Release Notes for Debian 8 (jessie).

  1. Configure the package repositories.

    You modify the configuration file for package repositories, /etc/apt/sources.list to include the URLs for the repositories for Jessie. It should include entries similar to:

    deb http://httpredir.debian.org/debian jessie main
    deb-src http://httpredir.debian.org/debian jessie main
    
    deb http://httpredir.debian.org/debian jessie-updates main
    deb-src http://httpredir.debian.org/debian jessie-updates main
    
    deb http://security.debian.org/ jessie/updates main
    deb-src http://security.debian.org/ jessie/updates main
    

    See Preparing sources for APT

  2. Get the list of available packages for Jessie:

    apt-get update
    
  3. Ensure you have enough disk space to download all the new packages. Then, upgrade the packages which can be upgraded without requiring any other packages to be removed or installed:

    apt-get upgrade
    

    This should have carried out a minimal upgrade which installs a new kernel and udev.

  4. Reboot the system to use the new kernel.

  5. Complete the process by upgrading the remaining packages:

    apt-get dist-upgrade
    
Share:
5,081

Related videos on Youtube

Tobias
Author by

Tobias

Updated on September 18, 2022

Comments

  • Tobias
    Tobias almost 2 years

    I have a Debian system (virtual development box, not reachable from the internet) which has not been updated for a while. Now I'd like to make up for this, but it seems the sources are not available any more:

    $ sudo -s
    > LANG=C apt-get update
    ...
    Ign http://backports.debian.org squeeze-backports/non-free Translation-de_DE
    Err http://backports.debian.org squeeze-backports/main amd64 Packages
      301  Moved Permanently [IP: 128.31.0.62 80]
    Err http://backports.debian.org squeeze-backports/contrib amd64 Packages
      301  Moved Permanently [IP: 128.31.0.62 80]
    Err http://backports.debian.org squeeze-backports/non-free amd64 Packages
      301  Moved Permanently [IP: 128.31.0.62 80]
    Fetched 13.5 kB in 8s (1512 B/s)
    W: Failed to fetch http://backports.debian.org/debian-backports/dists/squeeze-backports/main/binary-amd64/Packages  301  Moved Permanently [IP: 128.31.0.62 80]
    
    W: Failed to fetch http://backports.debian.org/debian-backports/dists/squeeze-backports/contrib/binary-amd64/Packages  301  Moved Permanently [IP: 128.31.0.62 80]
    
    W: Failed to fetch http://backports.debian.org/debian-backports/dists/squeeze-backports/non-free/binary-amd64/Packages  301  Moved Permanently [IP: 128.31.0.62 80]
    
    E: Some index files failed to download. They have been ignored, or old ones used instead.
    

    I was able to dist-upgrade from 7.4 to 7.11 today, but this seems to be all I can get.

    Is there a way to successfully update and dist-upgrade my system to Debian 8, Jessie? My main goal is to get apache 2.4 that way.

    Update: Here is my /etc/apt/sources.list file, empty and commented-out lines removed:

    deb http://debian.uni-duisburg-essen.de/debian/ wheezy main
    deb-src http://debian.uni-duisburg-essen.de/debian/ wheezy main
    deb http://security.debian.org/ wheezy/updates main
    deb-src http://security.debian.org/ wheezy/updates main
    deb http://debian.uni-duisburg-essen.de/debian/ wheezy-updates main
    deb-src http://debian.uni-duisburg-essen.de/debian/ wheezy-updates main
    deb http://opensource.wandisco.com/debian wheezy svn18
    
    • Shravan40
      Shravan40 about 8 years
      try apt-get update --fix-missing then apt-get dist-upgrade.
    • Flup
      Flup about 8 years
      If you're using Debian 7 (wheezy), why are you still using squeeze-backports?
    • Tobias
      Tobias about 8 years
      Good point! I commented out the squeeze-backports. Now the error messages have gone, but I apt-get dist-upgrade still doesn't lift me to Jessie.
    • user
      user about 8 years
      apt-get dist-upgrade is just a glorified apt-get upgrade on steroids. Show us your grep -REh '^[^#].*$' /etc/apt/sources.list*. (That gives all non-empty lines starting with something other than #.)
    • Tobias
      Tobias about 8 years
      I updated my question with the sources.list info.
  • Tobias
    Tobias about 8 years
    Phew - looks like a lot of work! Ok, I'll look into this ...
  • Tobias
    Tobias about 8 years
    Ok, I did it, and apparently everything worked. I simply replaced all wheezy in my sources.list by jessie, and svn18 by svn19. I had some hassle retracing the changes in my etckeeper - seems some symlinks were replaced by directories -, thus it will probably be wise to to this after every apt-get action.
  • Anthony Geoghegan
    Anthony Geoghegan about 8 years
    @Tobias Glad to hear that it worked out for you.