- Newest
- Most votes
- Most comments
You’re actually very close — the main issue is the use of the -d flag.
For upgrading Ubuntu 18.04 LTS to 20.04 LTS, you should not use -d. That flag is only for development (non-LTS) releases, which is why you’re seeing messages like “no development version available”.
Please follow this approach:
Update the release upgrade configuration:
sudo nano /etc/update-manager/release-upgrades
Ensure it is set to:
Prompt=lts
Fully update your current 18.04 system:
sudo apt update sudo apt upgrade -y sudo apt dist-upgrade -y sudo apt autoremove -y sudo reboot
After reboot, run the upgrade without -d:
sudo do-release-upgrade
Important note (strongly recommended): Before upgrading, take an EBS snapshot or create an AMI of the instance. Upgrading from 18.04 to 20.04 replaces and removes several system libraries and installs newer versions of packages. This can sometimes break existing applications or services.
Best practice is to:
First test the upgrade in a lower / non-production environment
Take a snapshot or AMI backup
Then proceed with the upgrade in production once validated
Also ensure you have enough free disk space, especially on / and /var.
This should resolve the issue safely. Hope this helps
When upgrading Ubuntu from 18.04 LTS to 20.04 LTS, the error you're encountering is fairly common and can be caused by several factors.
First, let's clarify the process: The sudo apt update && sudo apt upgrade -y command doesn't download the Ubuntu 20 installer - it simply updates your current packages to their latest versions within Ubuntu 18. The actual upgrade to Ubuntu 20 happens during the do-release-upgrade process.
For the network error you're experiencing during do-release-upgrade, here are some troubleshooting steps:
-
Check if your system can reach the Ubuntu update servers. Sometimes there might be temporary connectivity issues or the update servers might be under heavy load.
-
Try changing your update server. You can do this by editing
/etc/apt/sources.listand changing the mirror URL. -
Make sure you have enough disk space for the upgrade. Run
df -hto check available space. -
Try using the
-dflag with the upgrade command:sudo do-release-upgrade -d. This might help if the release isn't being detected properly. -
Ensure all your current packages are in a consistent state by running:
sudo apt update
sudo apt upgrade -y
sudo apt dist-upgrade -y
sudo apt autoremove -y
- Before attempting the upgrade again, take a snapshot or backup of your instance. This is crucial for EC2 or Lightsail instances as it allows you to recover if something goes wrong during the upgrade.
There are no special account prerequisites for performing an OS upgrade, but you do need to have sufficient permissions (sudo access) and ensure your system is properly prepared for the upgrade.
If you continue to experience issues, you might consider an alternative approach: create a new Ubuntu 20.04 instance and migrate your data and configurations to it.
Sources
Unable to access EC2 after upgrade from Ubuntu 18 to 20 | AWS re:Post
upgrade ubuntu version on lightsail | AWS re:Post
ok, i found out that our disk space is too small so i upgraded it enough to download the 20.x LTS version.
recap of the context: Upgrade our Ubuntu 18.04.6 LTS LTS to Ubuntu 20.x LTS.
i followed the steps on upgrading and get this issue now.
root@<ip address>:~# sudo do-release-upgrade -d Checking for a new Ubuntu release There is no development version of an LTS available. To upgrade to the latest non-LTS develoment release set Prompt=normal in /etc/update-manager/release-upgrades.
I set the prompt to "normal", and then execute the command again.
root@<ip address>:~# sudo do-release-upgrade -d Checking for a new Ubuntu release Upgrades to the development release are only available from the latest supported release.
root@<ip address>:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.6 LTS Release: 18.04 Codename: bionic
How to resolve this?
Relevant content
- asked 2 years ago

thank you! will keep you posted.