How do I upgrade from 17.04 LTS to newest non-LTS version? It's an older laptop and I'm not sure how to do it. Using the standard update isn't working.
But you can attempt to upgrade if you want. I tested this successfully, yesterday. The method I used consists of three upgrades: from 17.04 to 17.10, from 17.10 to 18.04 LTS, and then from 18.04 LTS to 19.04. I cover each of these three in its own section.
For why this particular sequence of upgrades works while others don't, see the "How is this even possible, and why is it even necessary?" section below. Some readers may be less interested in that, so I've put the instructions first.
17.04 to 17.10
This can be achieved using a variation on the procedure in laugh's excellent answer to How to install software or upgrade from an old unsupported release?
/etc/apt/sources.listto change your repository URLs to use the old-releases server. You can inspect the file with
less /etc/apt/sources/listor by opening it in a text editor. One way to perform the edits automatically is by running the command:
sudo sed -i.orig -r 's/us\.archive\.|security\./old-releases./' /etc/apt/sources.list
Before using that command, you should inspect the existing
sources.listfile. In that
usappropriately (or remove
us\.if you're using the main server,
archive.ubuntu.com) before running it.
For an alternative, see the
sedcommand in this post by fossfreedom.
Update your package manager's knowledge what packages are available and from where:
sudo apt update
If this produces errors, you should stop and investigate them. The first step may have been done wrong.
Upgrade packages within the current release to their latest available versions:
sudo apt upgrade
Make a temporary directory (it can be in your home directory) and change into it, and download and extract the upgrade tool for 17.10, by running these commands:
cd mkdir tmp wget http://old-releases.ubuntu.com/ubuntu/dists/artful-updates/main/dist-upgrader-all/current/artful.tar.gz tar xf artful.tar.gz
Normally, the Software Updater or
do-release-upgradecommand would automatically download and run this tool, but in this case it won't because 17.10 is end-of-life. Normally, in cases where it won't, you can still get a working URL for the tool from the
meta-releasefile as laugh's answer instructs, but in this case, the file does not (yet?) reflect that the tool has been moved to the old-releases server.
On such occasions, you can replace
old-releasesin the URL after
UpgradeTool:to get a working URL. Basically, you can try downloading with the URL it says to use and then, if that fails, try downloading from the old-releases server instead. That's what I did to get the URL shown above.
Go into the extracted directory and run the tool as root:
cd artful sudo ./artful
A window titled Distribution Upgrade should come up, showing the message Upgrading Ubuntu to version 17.10 with six steps: Preparing to upgrade, Setting new software channels, Getting new packages, Installing the upgrades, Cleaning up, and Restarting the computer. (Note that those steps do not correspond to the numbering of the instructions in this post!) The first step should complete successfully.
On "Setting new software channels," a dialog box will appear with the message:
No valid mirror found
While scanning your repository information no mirror entry for the upgrade was found. This can happen if you run an internal mirror or if the mirror information is out of date.
Do you want to rewrite your 'sources.list' file anyway? If you choose 'Yes' here it will update all 'zesty' to 'artful' entries. If you select 'No' the upgrade will cancel.
This works because, like the 17.04 (Zesty Zapus) repositories, the 17.10 (Artful Aardvark) repositories have moved to the old-releases server. Ever since step #1 above,
/etc/apt/sources.listhas old-releases URLs for 17.04. Clicking Yes lets the upgrader tool replace occurrences of
artfulwhich converts them to old-releases URLs for 17.10.
Another dialog box comes up to ask you, "Do you want to start the upgrade?" It tells you how many packages will be removed, installed, and upgraded, how big the download is, and lets you see the full details (of how each package is affected).
Click the Start Upgrade button.
If something were go to wrong, it would probably go wrong here. This is possible (even in upgrades that don't involve any EOL releases), but I think this is fairly unlikely. I believe the later upgrade from 17.10 to 18.04 LTS is where errors are more likely to occur. If it does happen, the troubleshooting techniques suggested in step 15 below may help.
You're asked if you want to remove obsolete packages. Unless you have a specific reason not to do this, I recommend clicking Remove.
You're asked to restart the system to finish the upgrade to 17.10. Do that by clicking Restart Now.
17.10 to 18.04 LTS
This is much more straightforward, at least if nothing goes wrong. In fact, the only reason I'm even showing a numbered list of steps below is to make clear where things are most likely go wrong and what to do about it. I think problems are more likely in this upgrade than in the preceding one, due to numerous packages in 18.04 LTS receiving newer versions since 17.10 became end-of-life.
One of the times I tried it, there was a problem, but I was able to fix it easily, as described below. The other time, I removed the
open-vm-tools-desktop packages before the upgrade, and even though those packages had been installed from Ubuntu's official repositories, proceeding without them eliminated the problem. (Unless you're using a VMware virtual machine, you probably don't have either of those packages installed, but you might have other packages that cause problems.)
Because 17.10 is not supported but 18.04 LTS is, the Software Updater automatically offers to upgrade to 18.04 LTS. This might even come up by itself. If not, just run the Software Updater.
If it still doesn't offer to update, quit the Software Updater, run
sudo apt update, and then run it again.
Click the Upgrade... button.
The release notes are shown. Click the Upgrade button at the bottom of that window.
A list of what the upgrade will do is shown, as in step #7 of the previous upgrade, and you're asked if you want to start the upgrade.
Click the Start Upgrade button.
The Distribution Upgrade window, which says "Upgrading Ubuntu to version 18.04" this time, shows the six steps of the upgrade. (As mentioned above, those steps do not correspond to the numbering of these instructions.) At least the first three steps should proceed with no problems.
The fourth step, "Installing the upgrades," takes the longest. If you've expanded the terminal view you may see messages that appear to be errors. If you do, they likely are errors, but don't worry yet: any errors you need to know about should be shown to you explicitly later.
If there's an error that prevents the upgrade from finishing, a dialog box will come up that says:
Could not install the upgrades
The upgrade has aborted. Your system could be in an unusable state. A recovery will run now (dpkg --configure -a).
If that doesn't happen to you, then please don't follow the rest of the instructions in this step, but skip to step 16 of these instructions instead.
If it does happen, click Close. The upgrader tool will try try to fix the problems by running
dpkg --configure -a. This attempts to configure broken or otherwise unconfigured packages, but it won't install any packages that haven't already begun to be installed. It will then likely tell you that the upgrade finished but with errors.
After the upgrader tool has closed, run:
sudo apt install --fix-broken
Then, if that appears to have fixed the problems, attempt to finish the upgrade:
sudo apt dist-upgrade
That might or might not actually be needed, depending on how much was being blocked and how much
sudo apt install --fix-missingended up having to do, so don't worry if
sudo apt dist-upgradedoesn't do much here.
Then I recommend you remove packages that were installed as dependencies of packages that are no longer installed (which covers many packages that the upgrader tool would offer to remove as obsolete if it had reached the end of the upgrade):
sudo apt --purge autoremove
Then reboot. If that fixed the upgrade, then you're in the 18.04 LTS system. Run
sudo apt updatefollowed by
sudo apt upgrade. If neither gives errors, and programs like Firefox and LibreOffice work, then the system probably works.
I believe the release upgrade process does not attempt to roll the system back to the release it started on, when when errors occurred after it started installing packages and it ran
dpkg --configure -ato attempt to fix them. However, you may want to check that the contents of the
bionic, the codename for 18.04 LTS, and that the output of
If there is no error, then the upgrade finishes installing packages. Then it offers to remove obsolete packages, as in step 9 above.
You're asked to restart the system to finish the upgrade to 18.04 LTS. As in step 10 above, do that by clicking Restart Now.
18.04 LTS to 19.04
18.04 LTS and 19.04 are both supported releases, and the release in between them, 18.10, is EOL. So upgrading 18.04 LTS is a normal upgrade from a supported release to the next release that is still supported.
There is only one special thing you may have to do to make this work. Even though, as guiverc says, 17.04 is not an LTS, and 17.10 isn't either, upgrading into 18.04 LTS may have set up your Ubuntu system so it only offers upgrades to subsequent LTS releases.
Run the Software Updater. If it offers to upgrade to 19.04, just do that.
Otherwise, there are only two command buttons: Settings... and OK.
Click the Settings... button. This brings up the Software & Updates preferences. If the Updates tab is not the current tab, click it.
Click the Close button.
This shows the usual dialog box that appears after you've changes your Software & Updates settings:
The information about available software is out-of-date
To install software and updates from newly added or changed sources, you have to reload the information about available software.
You need a working internet connection to continue.
Click the Reload button.
Run the Software Upgrader again.
This time, it offers to upgrade to 19.04.
The software on this computer is up to date.
However, Ubuntu 19.04 is now available (you have 18.04).
It also shows an Upgrade... button that didn't appear before. Click that Upgrade... button.
It will show you the release notes for 19.04.
Once you've gotten this far, this third upgrade is likely (though of course not certain) to proceed without problems.
I won't list the steps, because unlike the first two upgrades, this one isn't unusual and there's nothing special to do or say.
Assuming the upgrade succeeds, boot into and try out the new 19.04 system.
How is this even possible, and why is it even necessary?
A combination of two related factors made this problem interesting:
- 17.04 and 17.10 are both end-of-life, and 17.04 has been so for a while. Not only their repositories (which provide individual packages), but also their upgrader tools (importantly, the one for 17.10), have been moved to the old-releases server.
- They are not LTS releases. Upgrading from an LTS to the subsequent LTS release, skipping the releases in between, is very well-supported, and that doesn't apply here. Furthermore, because they're not LTS, they don't even have ESM support from Canonical, so they should no longer be expected to have much infrastructural support.
It is often said that Ubuntu only supports updates from one release to the next and from an LTS release to the next LTS release. Those cases are supported, but so is another: upgrading from a supported release to the next release that is still supported, when the releases in between them are no longer supported.
I've found this to work from some unsupported releases too--though usually when they've just become EOL recently--so I'd hoped the Software Updater or
do-release-upgrade tool might upgrade 17.04 directly to 18.04 LTS. And after I switched to the old-releases repositories on 17.04, it did offer to upgrade directly from 17.04 to 18.04 LTS:
Software updates are no longer provided for Ubuntu 17.04.
To stay secure, you should upgrade to Ubuntu 18.04.2 LTS.
But when I clicked Upgrade... and attempted to proceed with the upgrade, it downloaded the upgrader tool for 18.04 LTS, ran it, and the tool reported that upgrading from 17.04 was not supported:
Can not upgrade
An upgrade from 'zesty' to 'bionic' is not supported with this tool.
Attempting the upgrade with the
do-release-upgrade command produced the same error, as did manually downloading, unpacking, and running the
bionic upgrader tool.
I considered, and even attempted, a Debian-style upgrade procedure that begins with manually editing
/etc/apt/sources.list to point to the target release. I actually managed to upgrade from 17.04 to 18.04 LTS this way, but plenty went wrong that I had to repair. Furthermore, that procedure is not and has never been a supported way to upgrade to a new Ubuntu release. Except for upgrading to early-phase development versions of Ubuntu that are nowhere near release and cannot yet be reached with
do-release-upgrade -d (which most people won't ever want to do), I do not recommend that approach. I mention it here only for completeness.
- Kulfy and I brainstormed possible solutions. Kulfy astutely suggested it might still be possible to upgrade to 17.10.
- laugh wrote the answer that showed the technique of manually downloading, unpacking, and running an upgrader tool, for updates that are possible but that Software Updater (and
do-release-upgrade) don't facilitate.
Ubuntu 17.04 from 2017-April should have release-upgraded to 17.10, then 18.04 then... as it was a non-LTS and expected to be release-upgraded within the 9 month window.
Ubuntu 17.04 also used Unity 7 which has since been replaced by GNOME as the default desktop. I would suggest re-install, but refer to https://help.ubuntu.com/community/EOLUpgrades for EOL upgrade information.
If it's an older laptop, you've provided no details, however GNOME may not be the best desktop for it (it's a heavier desktop than what you've had) and switching to a flavor may better suit you (it does me!) Use LTS releases if you don't like release-upgrading every 6-9 months.
In your case; I would download Ubuntu 19.04 (or whatever flavor you prefer), write to media & backup your system. Install using "something-else" over your existing system (I'd do it without format). it'll note your added apps, wipe system directories (not touching $HOME) install new system, add-back additional programs you added (if in repos) then ask for reboot. That applies only with the 'no-format' option of "something-else". It'd be what I'd do (is far quicker than EOLupgrade too.
Also please note Ubuntu 17.04 was NOT a LTS release, which is why it is EOL. Only the first release in an even year (6.06, 8.04. 10.04, 12.04, 14.04, 16.04, 18.04 & 20.04 next year) are long-term-support releases, which you would have noted if you'd read the release notes of 17.04 (https://wiki.ubuntu.com/ZestyZapus/ReleaseNotes) which state
"Ubuntu 17.04 will be supported for 9 months until January 2018. If you need Long Term Support, it is recommended you use Ubuntu 16.04 LTS instead."
Release notes are well worth reading before installation, as they do contain notes, occasionally potential pitfalls (with fixes and work-arounds for those pitfalls) and information that can be worth knowing if you're considering the release.
Note: 6.06 was an anomaly, the release came out in 2006-June (not April), all first releases since then have been in April thus .04