How to upgrade to Ubuntu 23.04 from command line, Ubuntu 23.04 LTS (Lunar Lobster) was released on April 20, 2023 and will be supported for 9 months. It comes with many new packages and various enhancements 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.
Desktop edition comes with kernel v6.2, GNOME 43 and the latest screenshot and screen recording tools, plus a 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 directly upgrade to 23.04 from Ubuntu 20.04 or Ubuntu 22.04 If you are using a version earlier than 20.04, you must upgrade to Ubuntu 20.04 or 21.10 first.
The upgrade operation must be performed with superuser privileges. You must be logged in as root or as a user with sudo privileges. Also, make sure you have a stable internet connection.
Back up 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 in a virtual machine (VirtualBox or VMware), it is best to take a full system snapshot, so that you can easily restore your machine if the upgrade fails.
Update packages that have currently been installed
Before starting a version upgrade, it is recommended that you update all your installed packages to their latest versions.
Packages marked “restrained ” cannot be automatically installed, upgraded or removed. This can cause problems during the upgrade process. To check if any packages are “blocked” on your system, run:
sudo apt-mark showhold
If a packet has the status
on holdyou need to run the command
unholdwith the command:
sudo apt-mark unhold package_name
Next step, refresh the 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 version of Ubuntu is a very simple process. You can upgrade from the command line with commands
do-release-upgradeor using the GUI update tool.
We will perform the update from the command line, which should also work for Desktop and Server systems.
do-release-upgrade is part of the ” update-manager-core ” 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 typing:
sudo do-release-upgrade -d
This command will disable all third party repositories and change the apt list to point to the Lunar Lobsterre repository. You will be asked several times to confirm that you want to proceed with the upgrade. When prompted if you want the service to restart automatically during this type of upgrade, enter it
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 maintainer’s version of the package. If you didn’t make any particular 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 in the GNU screen session and will automatically reconnect if the connection suddenly drops.
Once the new packages are installed, the update tool will ask you if you want to remove the outdated software. If you are not sure, type it
dand see the list of obsolete packages. It is generally safe to type
yand remove all obsolete packages.
Once the upgrade process is complete, and assuming everything went well, you will be prompted to restart your machine. Type
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
Wait a few moments for the system to boot up and connect to your system. If you are a desktop user, you will be greeted with a new graphical startup and login screen.
You can also check the version of Ubuntu by entering the following command:
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.
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 see our article on the Ubuntu 23.04 local repository page