Score:8

How to upgrade from Ubuntu 22.04 to 22.04.1 via command line?

gt flag

I have a VM running Ubuntu 22.04 LTS, and I know that Ubuntu 22.04.1 LTS has been released months ago. Then how can I upgrade to 22.04.1 on the fly, keeping all existing software and configs?

I tried sudo do-release-upgrade, but told that There is no development version of an LTS available.

do-release-upgrade does not work

I hope that the answer is suitable to Ubuntu 22.04 running on WSL1 as well, because, there is a weird /usr/bin/gzip problem on WSL1, here: https://github.com/microsoft/WSL/issues/8219

Score:8
cn flag

You don't need special commands to upgrade a 22.04 system, the normal

sudo apt update

to update your software lists; ie. so your system knows what upgraded packages are available for install, then

sudo apt full-upgrade

to apply those security fixes & upgrades.

A reboot maybe required at completion.

The do-release-upgrade command is to change from using one release (jammy or 22.04 is what you're using now) to upgrade to a later release (eg. 22.10, or the next LTS which will be 24.04 a long time from now), and isn't used when you're trying to stay on the same jammy or 22.04 system you're currently using.

The "no development version of an LTS available" message you mention is because the development release of 24.04 doesn't open until after 23.10 has been released in October 2023 (and 22.10 is no longer a development release being a released or stable product).

guiverc avatar
cn flag
I'm not a user of WSL so cannot comment there; but I can't imagine the *developers* doing different for WSL users than the primary products do (*and amending existing documentation that's been in used for decade+*)
Jimm Chen avatar
gt flag
Great. After `sudo apt update`, `apt list --upgradable` says `gzip/jammy-updates 1.10-4ubuntu4.1 amd64 [upgradable from: 1.10-4ubuntu4]`. Then `sudo apt full-upgrade` works as expected on WSL1 (costs 10-minutes run) and now `lsb_release -a` reports it is Ubuntu 22.04.1 LTS. Most importantly, `/usr/bin/gzip` now works in WSL1.
guiverc avatar
cn flag
Just FYI @JimmChen, there are cases where `apt upgrade` will not apply all upgrades.. (refer to `man apt` to read the difference, but for my release [*lunar*] it reports for `apt full-upgrade` "*full-upgrade performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole*.") .. so I almost always just `apt full-upgrade` to ensure I receive all upgrades, rarely using `apt upgrade`actually.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.