I downloaded and installed Debian 7 Wheezy, the stable version, but I would like more recent apps and libs so I'd like to switch to testing version (aka Jessie). How do I proceed?


Simply switch your repos to testing and do a full upgrade:

# cp /etc/apt/sources.list{,.bak}
# sed -i -e 's/ \(stable\|wheezy\)/ testing/ig' /etc/apt/sources.list
# apt-get update
# apt-get --download-only dist-upgrade
# apt-get dist-upgrade

Make sure you stay plugged in for the duration of the last command, though. If it's botched or incomplete and you have to restart, you may need to resort to a re-install. Needless to say, never try this on a production machine.

The safer thing, of course, is to download a testing image and try it on a virtual machine first or something...


apt-get --download-only dist-upgrade added based on Michael Kjörling's suggestion.

| improve this answer | |
  • 6
    You can do apt-get --download-only dist-upgrade first to download all files that will be needed. You still probably wouldn't want to botch the installation process, but you won't need network connectivity. – a CVn Sep 12 '13 at 14:05
  • 9
    btw, aptitude (and apt-get) will always download all packages before they start installing them; so if you network connectivity breaks during the dist-upgrade, it will either not matter (since all the packages are already downloaded) or stop without harm (since the actual installation has not yet begun) – umläute Sep 19 '13 at 14:20
  • 11
    Minor warning : the sed script above caused my apt-get update to fail with: "W: Failed to fetch ftp.uk.debian.org/debian/dists/untesting/main/source/Sources 404 Not Found". When I stop laughing it'll be easy enough to fix... Otherwise, +1 : useful. – Brian Drummond Nov 26 '13 at 12:18
  • 1
    @DmitriDB Yes. It has been since fixed. – Joseph R. Nov 27 '14 at 6:36
  • 1
    Note that since Jessie was released on 26 April 2015, it is now "stable". The testing version is now codename "stretch". Instead of "testing" as the sed token replacement you might want to use "jessie". – Colin D Bennett Sep 14 '15 at 20:57

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