If you don't want to wait till August 2024 to upgrade to 24.04 and are ok with encountering some bugs following guide can help you.
https://www.cyberciti.biz/faq/how-to-upgrade-from-ubuntu-22-04-lts-to-ubuntu-24-04-lts/
There is a two step path to upgrade.
First upgrade to 23.10.
Then upgrade form 23.10 to 24.04.
Are you getting this error?
There is no development version of an LTS available.
To upgrade to the latest non-LTS development release set Prompt=normal in
/etc/update-manager/release-upgrades.
There are multiple ways to upgrade Ubuntu 22.04 LTS before the release of 24.04.1 LTS, scheduled for August 15th, 2024. Here’s one safe method:
Edit the /etc/update-manager/release-upgrades file and set Prompt=normal
Run:
sudo nano /etc/update-manager/release-upgrades
Set:
Prompt=normal
Save and close the file.
Next, run:
sudo do-release-upgrade -d
Follow all onscreen instructions. This will get you 23.10 release and reboot the system.
Run:
sudo reboot
Then, again edit the /etc/update-manager/release-upgrades and set Prompt=lts
Type:
sudo nano /etc/update-manager/release-upgrades
Set:
Prompt=lts
Save and close the file.
Finally, type the following command and follow the rest of the guide to upgrade from 23.10 to 24.04 LTS:
sudo do-release-upgrade -d
This note will automatically disappear after August 15th, 2024, as there will be no need for this kind of workaround. As a seasoned sysadmin and developer, I recommend waiting until the release of 24.04.1 LTS (scheduled for August 15th, 2024) before upgrading from Ubuntu 22.04 LTS. This ensures superb stability and minimizes potential compatibility issues with your apps. However, you can use these instructions for testing purposes. This is a great way to check if your applications will work seamlessly with Ubuntu 24.04 LTS.