I am on Debian wheezy and attempted to upgrade to jessie as follows:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

These operations completed successfully and I rebooted, but the system is still wheezy:

~: cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
NAME="Debian GNU/Linux"
VERSION="7 (wheezy)"

~: sudo apt-get dist-upgrade
[sudo] password for abc:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

How can I accomplish the distribution upgrade?

I do not have any custom inits or other custom configuration that would conflict with jessie.


apt-get dist-upgrade does nothing because your system is already up-to-date… for wheezy. You've instructed your system to follow wheezy, and that's what it does. To upgrade to another release, you need to change your package sources to point to that other release.

Package sources are declared in the file /etc/apt/sources.list. Edit this file and change all references to wheezy into jessie. Also edit files under /etc/apt/sources.list.d in the same way, if you have any.

You can make upgrades follow releases automatically by writing stable instead of e.g. wheezy, but this is not recommended because you'll get a whooping big upgrade each time a new stable release comes out, whether you're ready or not. Using moving release targets is mostly useful for testing.

Once you've updated /etc/apt/sources.list, run apt-get update to read the list of available packages for the release that you are now targeting, then apt-get dist-upgrade to perform the upgrade.

This is covered in the upgrade notes under “Preparing sources for APT”. It's a good idea to review the upgrade notes before you perform the upgrade. (Switch to the right architecture if you aren't on a 32-bit PC.)


Open the terminal and type the following command:

sed -i 's/wheezy/jessie/g' /etc/apt/sources.list
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get autoremove
apt-get clean
apt-get dist-upgrade -f
  • 1
    Why do you run upgrade before dist-upgrade and then later on dist-upgrade -f again? Things upgraded by dist-upgrade contain those upgraded by upgrade and if dist-upgrade leaves dependencies broken, another dist-upgrade -f won't fix it unless they are fixed in repository, which you don't check for by doing an update. – Max Ried Jul 27 '16 at 4:13
  • Also, got a program-not-found error on autoremove. – Tyler Durden Jul 27 '16 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.