» Upgrade any version of Ubuntu Desktop

I often hear about people who want to upgrade their version of Ubuntu with tools like apt-get, but if you run a desktop version of Ubuntu, there is a much better tool called update-manager. There are a lot of ways to upgrade Ubuntu. But this one is the best.

Almost every upgrade will go just fine nowadays. But still it's generally a good idea to be prepared for the worst, so besides backing up your data I wrote down some other notes that may help your upgrade.

So no rocket science this time, just a few tips from my own experience that will help you on your way once Gutsy's released.

Going to upgrade to Gutsy with compiz-fusion? Then you'd better checkout  this article

5 Ground Rules for upgrading Ubuntu Desktop Edition

  1. Never use apt-get or aptitude.
    Apt(itude) is great (it's got supercow powers), but for upgrading use update-manager instead (see the how-to below). Update-manager still uses apt in the background, but additionally fixes common errors, removes old artwork, etc.
  2. Don't use any critical applications when upgrading.
    Of course you can browse and such, but the system can't upgrade all the packages at the same time so if your running packages have dependencies you might get version conflicts and in the worst case a program can crash, and you may lose precious work.
  3. Take your time.
    • Upgrading can easily take up to 2 hours depending on your internet connection and computer performance.
    • Take into account that some programs might need some extra attention after the upgrade.
  4. Preferably have another PC with internet close by.
    It's no must but this way you can always search the internet to find solutions for any problems that you might encounter. A live CD is also an option.
  5. Read guides.
    For common installations this is not really necessary, but if you have custom drivers and 3rd party packages it really helps. They will show you common pitfalls. Learn from other people's mistakes.

How to upgrade Ubuntu Desktop Edition:

Press ALT+F2, a dialog will pop up. Type:

gksudo "update-manager -c"

And press run, like this:

-c means: Check for new distribution releases (upgrades).

Some people will tell you to use -d as well.
-d means: Development release. So it will look for distribution releases that aren't stable yet, and offer to upgrade to it. Don't use it unless you're into beta testing.

Already using compiz-fusion?

For people who are running compiz-fusion with packages & drivers from 3rd party repositories, I've written How to upgrade to Ubuntu Gutsy without breaking compiz-fusion.

Know more good ground rules?

Don't be shy and post a comment, I will add useful suggestions to this article.


Like this article?

   Then Digg it!
Or use another bookmark button below to show your support &
help me spread the word.


tags: ubuntu, upgrade
category: How to - Desktop
read: 42,600 times

Add comment

» Currently away on vacation. I can reply your message the 24th of July 2008. Please post anyway and check back then. Thank you!

for syntax highlighting

[CODE="Javascript"]
your_code_here();
[/CODE]

Replace "Javascript"
with "php", "text", etc.
code (to make sure you are not a spammer)

Comments

#44. Stephen on 17 January 2008

StephenThank you! I just got Ubuntu off a CD. Was a little weary of actually installing rather than just running it off the Live CD.

tbh, the Live CD sucked. It was slow etc but I suppose that is expected. I decided to install it and to my surprise it offered to partition my drive without formatting it. Thank God! I didn't mind formatting except I didn't want to wait.

Anyway to cut a long story short, the actually version I got was 6.x and naturally I wanted the most up-to-date version. It was telling me it was up to date but that line fixed it.
... [more]
How come Ubuntu doesn't naturally update itself to new versions?

Anyway, thanks!

#43. Kevin on 13 January 2008

Kevin@ Revilonab: Never did that but maybe comment the online sources out, and then update the package list?

#42. Revilonab on 12 January 2008

RevilonabHow can I upgrade my 7.04 to 7.10 via DVD? I added my dvd as a source but it still trys do download the files online.

Thank you for your help!

#41. Kevin on 22 November 2007

Kevin@DragonLee: I think they're even talking about a server, but that doesn't mean this couldn't happen to your laptop & this bug really resembles yours so have you tried adding those boot options?

Also have you tried ubuntuforums.org to see/ask if anyone has had the same problem?

#40. DragonLee on 22 November 2007

DragonLeeKevin, here https://bugs.launchpad.net/ubuntu/+source/debian-installer/+bug/35804 he is talk about a desktop and to use a floppy drive. I have a laptop, and is not old. I was thinking, similar, to make instead of a cd a flash drive to boot with, but I don't know how to set up the flash drive.

#39. Kevin on 22 November 2007

Kevin@ DragonLee: I never had this problem, but it looks a lot like this bug:
https://bugs.launchpad.net/ubuntu/+source/debian-installer/+bug/35804

"At the boot menu, hitting "F6" and then putting "ide=nodma" as part of the kernel command line parameters helped the installer get past the 4 to 6% hanging point (regardless of whether I said "yes" or "no" to the PC Card services.). So, it looks like the hang I had at the 4 to 6% was a DMA issue."

#38. DragonLee on 22 November 2007

DragonLeeI made a mistake: "tu" suppose to be "to".
I have a hp laptop, 1.7, 512, 100Gb. I tried to install Ubuntu 7.10 but when I get to the point to install the base package (after I set up the language, network, time) the progress bar stops to 6% and after 20-25min I get an error that this step was skipped.
Every time is the same. Why doesn't work?

#37. Kevin on 21 November 2007

Kevin@DragonLee: To begin solving the problem, I first need to know more about it. Are there any specific errors? Are you running on exotic hardware? What do you mean by 'tu' ?

#36. DragonLee on 21 November 2007

DragonLeeI tried to install ubuntu 7.10 but after I press tu install doesn't work. The only version that I could install is 5.10. I tried 7.04 and 6.4, but I have the same problem. I can't upgrate 5.10 because the sistem said that is up to date even I used that comand with alt+f2.
What do I have to do?

#35. Kevin on 08 November 2007

Kevin@ seamus: Maybe try my other article:
http://kevin.vanzonneveld.net/techblog/article/upgrade_to_ubuntu_gutsy_with_compizfusion/
It contains more information on nvidia drivers and such.

Post specifics there if it still won't work and the article can't help you.

#34. seamus on 08 November 2007

seamusmy nividia card drivers still not working ;(

#33. Kevin on 17 October 2007

Kevin@ Joshua Giese: Thank you!

#32. Joshua Giese on 17 October 2007

Joshua Giesethanks for this tutorial, I have been seeing a few blogs talking about using "gksudo "update-manager -d", yours is the first blog I have seen to say use gksudo "update-manager -c" Thanks for the words of advise. Keep up the good blog posts

#31. Marcus on 16 October 2007

MarcusI refuse to use update-manager for as long as it refuses to play nice with aptitude's auto-marked flag. Otherwise the next updates won't work properly since a lot of libraries etc. will be marked by update-manager/apt as "manually installed" although they aren't.

#30. Kevin on 16 October 2007

Kevin@ Ben: I've never upgraded in such big steps (dapper edgy feisty gutsy, all at once) but I wouldn't be surprised if update-manager proposes to upgrade to Gutsy if you'd run it with -c. And if it does, I think I would follow it's lead. You can always reinstall afterwards so why not just give it a shot? (of course, make backups)

#29. Ben on 16 October 2007

BenAny tips on moving from say, Dapper to Feisty/Gutsy in one go? I would guess it is wiser to freshly install rather than try to hop releases. Many people started on Ubuntu with Dapper, due to the fanfare of it, but never upgraded to edgy/feisty/etc with due reason.

But Gutsy (and Feisty to some extent) have some really killer upgrades - GUI WiFi support, Bulletproof-X, Compiz, and so on, and upgrading to these non-LTS versions would be great for new users due to these enhancements (And Feisty has been rock solid for me so far, so there wouldn't be a problem there.)

So how best to upgrade and skip versions at the same time?

#28. Kevin on 16 October 2007

Kevin@ Peter: Anyone can tell you upgrade-manager uses apt under the hood. That's no point of discussion and I never said it was. Just click on 'show terminal' or something, and you can see it with your own eyes.
But sure dude, here it is the link that says apt-get is not recommended: "Manual command-line upgrade (not recommended)

Please note - this method is less reliable. If you use this method, you MUST be prepared to fix problems manually, such as packages being unexpectedly removed, apt crashing unexpectedly, etc. Using Update Manager (see above) is likely to be much less problematic." From:
http://www.ubuntu.com/getubuntu/upgrading
... [more] (not ubuntuforums)

@ Samuel Thurston:
If you upgrade with update-manager you will see that it first downloads some files before commencing the actual upgrade procedure. These files are specific for your dist upgrade (whether it's from breezy->edgy, edgy->feisty or from feisty->gusty or whatever) and contain additional package information on your new release in relation to the old one. Still skeptic? Have a look at the python sources in /usr/share/update-manager/*.cfg
And you will find that they contain information on demoted packages, removal blacklist, and (maybe most important) additional packages that come with the new distribution. This is something apt is unable to detect, yet it provides fixes for common upgrade problems.

Don't get me wrong. I love apt. It's what has made Debian & Ubuntu what it is today. Great. It's just not the best way to upgrade your Ubuntu release nowadays. Open up.

@ Peter + Samuel Thurston:
If you do persist in using commandline APT (and not 'do-release-upgrade'), please for your own sakes at least use aptitude and not apt-get:
http://www.garfieldtech.com/blog/your-debian-aptitude

@ cga: Thanks for your info, but I believe that update-manager is capable of automatic sources.list handling.

#27. cga on 15 October 2007

cgai wuold suggest to

cp /etc/apt/sources.list /etc/apt/sources.list.bak

vim /etc/apt/sources.list
... [more]
and remove any 3rd party repos

do the upgrade as you described it

vim /etc/apt/sources.list

and add back the necessary 3rd party repos if needed

#26. Peter on 15 October 2007

PeterAs I said, upgrade-manager uses apt-get under the hood. Getting rid of old artwork, etc, is done with the autoremove option. See apt-get manpage for details.

Please provide a link (not ubuntuforums) from ubuntu.com that says that apt-get is not recommended.

#25. Samuel Thurston on 15 October 2007

Samuel Thurstonhey, uh, after the sequence I posted earlier, I can run

sudo apt-get autoremove

to clear out "old packages, old artwork and init files".. so really, what does it do that apt doesn't do? I am sorry, I'm not trying to troll, just really curious.

#24. cartman on 15 October 2007

cartmanthanks for the info

Cart

#23. Kevin on 15 October 2007

Kevin@ Peter: Sorry man. But you're wrong on every point. Please read more carefully before making such statements:

1. Upgrading with aptitude or apt-get can work but it's not the best way. Ubuntu recommends update-manager as it fixes common problems, removes old packages, cleans old artwork, init files, etc. So please read more carefully.

2. I'm not saying the upgrade will fail, I'm telling you that you might lose work if an application crashes because of version discrepancies between dependencies. I've seen this happen. So Read.
... [more]
3. For upgrading servers please use the following method:

sudo apt-get install update-manager-core
sudo do-release-upgrade

..As recommended by ubuntu.com to take advantage of all the benefits of update-manager.

The discussion is not just about methods. It's about the Best. Read.
update-manager is not just a GTK interface for apt-get. It is much more. Why do you think I write an article about this anyway? Apparently, people like you (still upgrading their systems the OLD way) prove the need of it.

#22. Peter on 15 October 2007

PeterSorry, I forgot one additional point:

We run a lot of our servers with Ubuntu (Ubuntu server edition). There is no graphical environment. Update-Manager is NOT EVEN INSTALLED on those servers. How the heck would we upgrade? With apt-get of course.

#21. Peter on 15 October 2007

PeterMuch of what was said in this article simply isn't true.

1. apt-get is one correct way to upgrade your system. For example, the author suggests using gksudo "update-manager -c", the original and correct way to do this from the command line with apt-get is:

sudo apt-get update
... [more] sudo apt-get dist-upgrade

update-manager simply hides these details from you and is doing the same thing behind the scenes.

2. The author advises not to run any critical applications or the upgrade will fail. This is also false and shows a lack of understanding about how Unix works. You can run anything you want during the upgrade. In fact, I could run the word processor abiword and while using it, remove it from the system and it would continue to work until I exited the application.

#20. Kevin on 15 October 2007

Kevin@ Alan Pope: Oh, my bad. It's time for coffee I guess ;)
@ matroos: for compiz-fusion, envy, nvidia, I will be writing another article before Gutsy gets stable.

#19. matroos on 15 October 2007

matroosHi Kevin,
up till now I have never been able to upgrade. Breezy to Dapper to Edgy to Feisty, never worked. Probably because I had tweaked too much and had too much installed outside of the repo's.
So is there any way to know if I should remove anything before upgrading?
nvidia driver?
envy?
... [more] compiz-fusion icon?
latest flash from adobe site?

#18. Alan Pope on 15 October 2007

Alan Pope@Kevin, that's what _I_ _said_ !

My issue is with the recommendation to use "update-manager -c", the -c is _not_ required normally, it's only needed if you want to go from an LTS release to the next non-LTS release.

#17. NOZ on 15 October 2007

NOZGreat, thank.
I'm looking forward to upgrade instead of clean install.

www.dcorate.com

#16. else on 15 October 2007

elseThis tip is useless for somebody who uses a customized ubuntu version without the [x,k]ubuntu-desktop package. update-manager will then fail with an error. Perhaps you can explain how to upgrade your Ubuntu properly in this case...

Anyway nice tips!

#15. Kevin on 15 October 2007

Kevin@ Thomas B.: That depends on what's broken.

@ Sumuel + cartman: Upgrading with aptitude or apt-get can work but it's not the recommended way.
Update-mananger fixes common problems, removes old packages, cleans old artwork, init files, etc.

... [more] @ Alan Pope + inaccurate: The -d argument makes it look for development (unstable) releases. So don't use it unless you're in a hurry or want to do some beta testing.

#14. jvin on 15 October 2007

jvin@solarwind... for Kubuntu use

sudo update-manager

#13. trey on 15 October 2007

treyStep 1) download debian ISO
Step 2) burn ISO image
Step 3) Install Debian

#12. Derick on 15 October 2007

DerickWARNING: DO NOT TRUST STEP 1 if you are using Xubuntu. Trying to use the update manager GUI for an upgrade from 6.10 to 7.04 almost ruined my entire system once upon a time, and it was a widely known bug. I've used "sudo apt-get dist-upgrade" many times with no problem, although you have to manually update your sources.list too ;)

#11. Samuel Thurston on 15 October 2007

Samuel ThurstonI am just curious why you say to "never" use apt-get? I've always done my upgrades like this:

sudo cp /etc/apt/sources.list /etc/apt/sources.backup
sudo sed -i 's/feisty/gutsy/g' /etc/apt/sources.list
sudo apt-get update && sudo apt-get dist-upgrade
... [more]
What does update manager do that this procedure doesn't?

#10. cartman on 15 October 2007

cartmanI have just been reloading Synaptic and waiting for the update icon to come up on the panel. Doing this since feisty release, so I'm toast? Gutsy is running fine for the last couple of months.

Cart

#9. inaccurate on 15 October 2007

inaccurateShould be:

gksudo "update-manager -c -d"

Please fix this blog post(!)

#8. Alan Pope on 15 October 2007

Alan PopeThis is inaccurate. The "-c" parameter is required if you want to upgrade from an LTS release (such as 6.06.1 [Dapper]) to the next (NON-LTS) release (such as 6.10 [Edgy]).

If you are already running a non-LTS release then update manager will provide a button to upgrade to the next release. For example if you are running 6.10 (Edgy) and wish to upgrade to 7.04 (Feisty) then just run update manager and you'll get the prompt.

The further exception comes with upgrading to development releases. These are not automatically prompted, and if you really want to upgrade to them you need the "-d" parameter.

#7. OK on 15 October 2007

OKand? will you reboot?

#6. Thomas B. on 15 October 2007

Thomas B.What if someone did upgrade using apt-get just before reading this? a) What did they break, and b) How would they fix it?

Y'know... hypothetically.

#5. tfsd on 15 October 2007

tfsdWhat if I have an old, old version of Ubuntu? Can I just reformat the Ubuntu partition on a dual-boot hard drive? If so, how?

#4. Kleedrac on 15 October 2007

KleedracThanks for that constructive criticism ... now go reboot like a good boy while I keep working ;)

#3. Linux <= Shit on 15 October 2007

Linux <= ShitLinux <= Shit

#2. ori on 15 October 2007

orisolarwind, check out: https://help.ubuntu.com/community/GutsyUpgrades#head-03dfe71741407e245a9fcd75bded428572061f53

#1. solarwind on 14 October 2007

solarwindIf I don\'t have Ubuntu and have only KUbuntu (KDE only) how do I do this?