Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am new and do not, of course, know a lot about installing and maintaining an Ubuntu release.

One of the "tricks" I have learned to use is sudo apt-get update followed by sudo apt-get upgrade to download and install updates for the installed software.

I recently installed beta 2 of Ubuntu 12.04 (precise pangolin ?) to a test disk/partition just to see what it was like. After the install I updated the software using the commands I listed above because, well, that is what I always do.

Was this a mistake? Are the alpha & beta releases of Ubuntu updated in a different way?

I recently saw reference to the dist-upgrade command for apt-get and decided I would try using that to update 12.04. A lot of programs were upgraded, including the kernel so I'm wondering if using just sudo apt-get upgrade was the wrong way to go for a release which is still under development.

share|improve this question
    
Hmmm. The comment I replied to disappeared. In case anyone is curious, it asked about the question How do I update when using a development release? –  irrational John Apr 3 '12 at 19:21
add comment

4 Answers 4

up vote 4 down vote accepted

Think of apt-get upgrade as a safe upgrade while testing candidate releases. You should use it normally for (mostly) daily upgrade process to keep your packages up to date without* breaking your system. The upgrade option is used only to update the packages already installed on your machine to a newer version.

apt-get dist-upgrade will not only upgrade all of the currently installed packages on your system but also handle the dependency changes for new versions of packages. It intelligently** will remove obsolete packages from your system and install any further necessary. During beta use this option with caution. Normally this function needed for upgrading from one distribution release to another.

* Without breaking is a big statement, remember, this is alphas or betas we are talking about.
** Intelligently is definition but because all is beta extra caution should be taken.

Precautions to take while upgrading a pre-release

  • Upgrade only using the terminal, at least you will know exactly what is going to happen before pressing Y and letting apt do changes to your system.
  • When running a apt-get dist-upgrade is needed (new kernel, major change on system packages, etc) make sure that you first run apt-get dist-upgrade -s to simulate and please read all the changes the upgrade will apply. If you see any weird changes (_I remember killing my system after a dist-upgrade asked me to remove some necessary system packages and the Ubuntu Software Center while 12.04 was in alpha 1) abort it and update you packages again in a few days.
  • Do not use the update manager while updating a pre-release. Make sure that you can read everything that is going to happen to your system before pressing Y.
  • Don't be too eager to update! Don't do it out of speed, this is a sensible process during a pre-release. Use caution and some patience when testing it.

When should you use a upgrade compared with a dist-upgrade?

Use a dist-upgrade when you know the pre-release just went from alpha to beta or the next scheduled step or in the "Wont update these packages" list during a apt-get upgrade there are new kernels and other major packages, be extra cautious of the list of packages that will be removed. If there is anything there that you are not sure, or that you think it might break your system abort it after the simulation and get your self informed via the forums or on the IRC channels before applying the changes.


If you need further help during the update period or just a quick chat to point you in the right direction during an pre-release system read the informationins this post

Don't be hasty and be prepared all times, a backup or 2 are never too much to ask when testing.

share|improve this answer
    
The main reason I asked was because after I ran the upgrade some simple features of 12.04 did not appear to work as they did in 11.10. It was most likely just user error on my part, but I wanted to check that I hadn't mistakenly applied the wrong changes. I find it hard to believe that there is anything "big" wrong with 12.04 since it is less than a month away from expected release. So if I encounter a glitch I look to myself first before suspecting a bug. –  irrational John Apr 3 '12 at 19:10
    
It should be safe to run a dist-upgrade without expecting any major borkage, those will occur mainly in the alpha stage. –  Bruno Pereira Apr 3 '12 at 19:13
    
The other reason I was puzzeled was that when I ran sudo apt-get upgrade it came back with something like 360 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. 360 upgrades was a tad more than I expected for 12.04 beta 2 which is only a few days "old" at this point. But, seriously, what the heck do I actually know about any of this? ;-) –  irrational John Apr 3 '12 at 19:34
    
Naaa, 360 is cool, don't sweat about it. The more they fix, the happier I am. –  Bruno Pereira Apr 3 '12 at 19:36
add comment

Normally you just need to open a terminal and update with

sudo apt-get update && sudo apt-get upgrade
share|improve this answer
1  
It depends on the changes. apt-get upgrade will upgrade all the software on your system to the newest version, unless this requires installing additional new packages. apt-get dist-upgrade will upgrade all the software on your system to the newest packages, including installing any new packages that may be required (or even recommended). You could try just upgrade, and then afterwards run dist-upgrade to see if dist-upgrade would do anything for your system that upgrade has not already done. –  Emmet Hikory Jul 10 '11 at 17:35
add comment

No, this was not a mistake. upgrade will refuse to add or remove packages, and sometimes the new version of a package requires new packages to be installed, or old ones to be removed. When that happens, you will need to use dist-upgrade instead. If dist-upgrade wants to remove a bunch of packages, you may want to say no and try again the next day as the package may simply be in a transition where it can't be correctly installed at the moment.

share|improve this answer
add comment

No they are updated in same way.

Though there is an update manager to do this graphically.

Just tap Super key to bring up unity search interface and type "update". Then click on "Update Manager. Then do a check, it will list all updates (basically apt-get update), if any update available you can upgrade (apt-get upgrade)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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