Ubuntu - upgrade distribution to specific release

How do I upgrade an older version of Ubuntu Server (Jaunty, for example) to a specific later version (Lucid, for example) using the command line?

I'm concerned that dist-upgrade is going to update to the latest, which is not LTS

clarification:

  • has to be command line
  • our internal mirror has removed the Jaunty images
  • tried editing /etc/update-manager/release-upgrades to use only LTS versions, but it hangs. (trying to reach an outside server?)

Update: It seems Jaunty to Lucid is not possible (directly) ref, but my question was still for the more general case


dist-upgrade does not technically perform a release upgrade. You're looking for the do-release-upgrade command. If you've got /etc/update-manager/release-upgrades set to prompt=LTS and the packages are available on your mirror it should work. If not, I would suggest verifying the packages on the mirror next.