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?
Asked
Active
Viewed 9.0k times
43
-
5Not an answer, but an alternative: There are backport repos available, so you can update only certain applications to the versions in testing, while staying with stable for the rest of the system. http://backports.debian.org/ – soulsource Sep 12 '13 at 13:57
-
Try this http://alexander.holbreich.org/2015/04/updating-debian-wheezy-to-jessie/ – aholbreich May 08 '15 at 12:13
1 Answers
69
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...
Edit
apt-get --download-only dist-upgrade
added based on Michael Kjörling's suggestion.
-
6You 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. – user Sep 12 '13 at 14:05 -
-
9btw,
aptitude
(andapt-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 -
11Minor warning : the sed script above caused my
apt-get update
to fail with: "W: Failed to fetch http://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. – user_1818839 Nov 26 '13 at 12:18 -
-
uhhh, isn't that untesting indicative of someone trying to do search/replace on the word 'unstable'? – Dmitri DB Nov 27 '14 at 04:05
-
1
-
1Note 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
-
1Also note that your sources.list might have a codename (wheezy) instead of the distribution state "stable". Then you would replace wheezy with jessie. If you had "stable" in the sources.list file, you would have automatically been upgraded to jessie when it was released and you did ant apt upgrade. – Colin D Bennett Sep 14 '15 at 21:00
-
@MichaelKjörling:Could you tell whether the first two lines in Joseph's answer are neccessary?I'm asking this because the PC I'm using is college property. – justin Jan 08 '16 at 09:16
-
@justin the first just makes a backup; always a good idea, but not actually necessary. Just something you'd be silly not to do. The second is essential. That's the line that does all the work since it is the one that makes your system point to the testing repository. – terdon Jan 08 '16 at 10:53
-
@terdon:Since all went well I upgraded from whezzy to jessie with one command
sudo apt-get dist-upgrade -f
.Maybe because I have updated(or upgraded) jessie to a newer jessie before.But I forgot about installing grub because I thought it would automatically take the old grub.So know I can't see windows eventhough the boot sector and files are present.Is there any way to get back grub so I could get windows with jessie? – justin Jan 08 '16 at 10:58 -
@justin please use the ask question link to ask questions. Comments aren't the place for such discussions. They also generate notifications for the poster of this answer which can get very annoying. Look for
update-grub
and post a question if you still have problems. – terdon Jan 08 '16 at 11:04 -
1@terdon:Sorry to mention I got grub back with
sudo grub-install /dev/sda
from this link:(http://unix.stackexchange.com/questions/231320/grub-file-not-found-after-an-update-from-debian-wheezy-to-jessie). – justin Jan 11 '16 at 06:38 -
You also should simulate before doing the actual upgrade:
apt-get -s dist-upgrade
. – Michael F Mar 05 '16 at 14:22