Step 1: Upgrade the packages to the latest version for 16.04 decreases the chance of something going wrong during the upgrade to version 18.04. Run the command below
sudo apt update && sudo apt upgrade
Step 2: Install the Ubuntu Update Manager.
sudo apt install update-manager-core
Step 3: Upgrade Ubuntu
sudo do-release-upgrade
Step 4: After the upgrade is complete, a restart will be required.
Step 5:To check what version of Ubuntu is currently installed, use the command below.
lsb_release -a
If that does not work, you need to follow these steps
Step 1: Edit apt
configuration
Press Ctrl Alt T to open terminal
Now, type
sudo nano /etc/apt/apt.conf
Step 2: Change the config:
APT::Default-Release *;
Note If the apt.conf
file does not exist, create your own user file in /etc/apt/apt.conf.d
so you can guarantee that it won't be overwritten by package updates.
Use the command to create the file
sudo touch /etc/apt/apt.conf.d/apt.conf
Then to edit your file run
sudo nano /etc/apt/apt.conf.d/apt.conf
Add this line to the file
APT::Default-Release *;
cat /etc/apt/sources.list
? And what aboutcat /etc/update-manager/release-upgrades
? – Kulfy Jan 05 '20 at 09:47lts
(to get upgrades to LTS releases only) ornormal
(to get any upgrade to any release including non-LTS releases). – Kulfy Jan 05 '20 at 10:07