How to Upgrade to Ubuntu 23.04 from the Command Line, Ubuntu 23.04 LTS (Lunar Lobster) was releasing on April 20, 2023, and will be supported for 9 months. It comes with many new packages and various improvements to major software systems, including the latest versions of OpenSSL, GCC, Python, Ruby, and PHP. This release is based on the Linux 6.2 kernel and adds support for the latest hardware and file systems.
The desktop edition comes with kernel v6.2, GNOME 43, and the latest screenshot and screen recording tools, and new Ubuntu installer
This tutorial explains how to upgrade to Ubuntu 23.04 LTS from Ubuntu 20.04 or Ubuntu 21.10.
Prerequisites Upgrade to Ubuntu 23.04
You can upgrade directly to version 23.04 from Ubuntu 20.04 or Ubuntu 22.04 If you are running a release prior to 20.04, you must first upgrade to Ubuntu 20.04 or 21.10.
The upgrade operation must be executed with superuser privileges. You must be logged in as root or a user with sudo privileges. Also, make sure you have a stable Internet connection.
Backup Your Data
First and foremost, make sure to back up your data before starting the upgrade process on your operating system. If you are running Ubuntu on a virtual machine (VirtualBox or VMware) it is best to take a full system snapshot, so you can easily restore your machine if the upgrade fails.
Update Packages that have been Installed Currently
Before starting a release upgrade, it is recommended to update all your installed packages to their latest versions.
Packages marked “held back ” cannot be automatically installed, upgraded, or removed. This can cause problems during the upgrade process. To check if any packages are “stuck” on your system, run:
sudo apt-mark showhold
If any packet has status on hold
, you must run the command unhold
with the command:
sudo apt-mark unhold package_name
Next step, Refresh apt list and upgrade all installed packages:
sudo apt update && sudo apt upgrade
If the kernel is undergoing an upgrade process, reboot the machine to apply the changes and minimize errors:
sudo systemctl reboot
Upgrade the major version of the installed package:
sudo apt full upgrade
Remove any auto-installed dependencies that are no longer needed by any package:
sudo apt --purge autoremove
Upgrade to Ubuntu 23.04 LTS (Lunar Lobster)
Upgrading to the latest Ubuntu version is a very easy process. You can upgrade from the command line with commands do-release-upgrade
or using the GUI update tool .
We will be performing the update from the command line, which should work for Desktop and Server systems as well.
do-release-upgrade is part of the “ update-manager-core ” package which is installed by default on most Ubuntu systems. If for some reason it is not installed on your system, install it with the command:
sudo apt install update-manager-core
Start the upgrade process by entering:
sudo do-release-upgrade -d
This command will disable all third party repositories and change the apt list to point to the Lunar Lobsterrepository. You will be asked several times to confirm that you want to continue with the upgrade. When asked if you want the service to restart automatically during this type of upgrade, type it y
to confirm.
During the upgrade process, the command will ask you various questions, such as whether you want to keep the existing configuration file or install the package maintainer version. If you didn’t make any special changes to the file, type Y
. Otherwise, it is recommended to stick with the current configuration. Read the questions carefully before making a choice.
The upgrade process runs inside the GNU screen session and will automatically re-attach if the connection suddenly goes down.
After the new packages are installed, the update tool will ask if you want to remove the outdated software. If you’re not sure type it d
and check the list of obsolete packages. It’s generally safe to type y
and remove all obsolete packages.
When the upgrade process is complete, and assuming everything went smoothly, you will be prompted to reboot your machine. Type y
to continue:
System upgrade is complete. Restart required To finish the upgrade, a restart is required. If you select 'y' the system will be restarted. Continue [yN] y
Confirm Upgrade
Wait a few moments for the system to boot up and login to your system. If you are a desktop user, you will be greeted with a new graphical boot splash and login screen.
You can also check the Ubuntu version by entering the following command:
lsb_release -a
No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu 23.04 LTS Release: 23.04 Codename: Lunar Lobster
At this point, the upgrade to Ubuntu 23.04 has been successful and enjoy your new Ubuntu 23.04 installation.
Conclusion
Upgrading to Ubuntu 23.04 LTS is a relatively easy task. If you encounter any errors, visit the release notes page , which covers known issues that may have occurred during the upgrade process.
If you want the update process to be faster in the future, you can add a local repository to your Ubuntu 23.04 system. Please visit our article on Ubuntu 23.04 local Repository page
Leave a Reply