Ubuntu 22.04 Upgrade Guide & Notes

tags: Ubuntu

Backups

  • backup your home directories data
  • make sure your social accounts, such as facebook account or gmail account, can be verified from other devices

Upgrade System Packages

Make sure there is at least 166Mb of available spaces in boot directory

  • If the boot directory is still not enough during the upgrade, you can change the compression method from lz4 to xz through the initramfs.conf configuration file.
    • /etc/initramfs-tools/initramfs.conf
1
COMPRESS=xz

Download iso file & Upgrades

  • To avoid upgrade failure, you can also use the ventoy tool to reinstall the operating system. It is recommended to download the ISO file of the operating system

Upgrade Commands

1
2
3
4
5
6
7
8
9
sudo apt list --upgradable
sudo apt update && sudo apt upgrade -y
sudo reboot
lsb_release -a
sudo ufw allow 1022/tcp
sudo ufw reload
sudo ufw status
sudo apt install update-manager-core
sudo do-release-upgrade -d

Check your upgrade result

1
2
lsb_release -a
uname -mrs

Take Away

About the system directories

  • /root: recommended to use the same root directory for the upgrade.

    • perform the operating system upgrade in the same root directory, because keep the old directory there may be conflicts after the upgrade.
  • /boot: The autoremove command will remove packages that are no longer needed in an installed package. These packages are usually packages that were previously installed and are no longer needed.

1
sudo apt autoremove

References

https://www.youtube.com/watch?v=PtJXKdejbV0