- Newest
- Most votes
- Most comments
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 a year ago
- asked 10 months ago
- asked 8 months ago

thank you! will keep you posted.