Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Normally in Ubuntu if a new release is available the GUI will tell you. However, if you're running Ubuntu on the server, there is no GUI.

You can run lsb_release -a, which will at least tell you what your current release is, but that doesn't tell you whether there is a new release you can upgrade to. I'm trying to write a dead-simple "determine whether it's upgrade time" script, and it would be really handy to be able to do so via a command ... does anyone know one?

share|improve this question
up vote 2 down vote accepted

Check the command do-release-upgrade. If there is no new version available, it simply returns accordingly:

$ do-release-upgrade 
Checking for a new ubuntu release
No new release found

If there is a new release available, however, it goes on downloading the differences, asking for sudo password (if run by non-privileged user for upgrades).

For LTS versions of Ubuntu, I believe it only shows that there is an upgrade available if there is a new LTS version available. Do some more research of the tool to see its exact quirks.

share|improve this answer
I knew about do-release-upgrade, but didn't think it could be used "diagnostically" until I read your "run without sudo" idea; thanks! – machineghost Apr 18 '12 at 19:02
Adding -s will also just show what it would have done, without actually doing anything. You can do this for instance to time an upgrade. – oligofren Jun 8 '13 at 9:34

Your Answer


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.