0

How can I upgrade Ubuntu 16.04 to 18.04?

Failed to fetch 
http://bd.archive.ubuntu.com/ubuntu/pool/main/l/llvm-toolchain-6.0/libllvm6.0_6.0-1ubuntu2_amd64.deb 
Hash Sum mismatch 

Failed to fetch 
http://bd.archive.ubuntu.com/ubuntu/pool/main/u/ubuntu-wallpapers/ubuntu-wallpapers-bionic_18.04.1-0ubuntu1_all.deb 
Hash Sum mismatch 

Failed to fetch 
http://bd.archive.ubuntu.com/ubuntu/pool/universe/f/fonts-takao/fonts-takao-pgothic_00303.01-2ubuntu1_all.deb 
Hash Sum mismatch 

3 Answers 3

2

Upgrade Ubuntu, please follow the steps below

STEP 1: UPDATE UBUNTU 16.04 SERVER

Before upgrading to Ubuntu 18.04, you should first update the current 16.04. It’s recommended to update/upgrade all installed packages before upgrading. To update Ubuntu, connect to the server and run the commands below:

sudo apt update && sudo apt dist-upgrade && sudo apt autoremove

STEP 2: INSTALL UBUNTU UPDATE MANAGER

After updating Ubuntu 16.04 server, run the commands below to install update-manager-core if it is not already installed.

sudo apt-get install update-manager-core

Then open the update-manager configuration file and make sure the Prompt line is set to lts

sudo nano /etc/update-manager/release-upgrades

Confirm that the Prompt is equal lts

# Default behavior for the release upgrader.

[DEFAULT]
# Default prompting behavior, valid options:
#
#  never  - Never check for a new release.
#  normal - Check to see if a new release is available.  If more than one new
#           release is found, the release upgrader will attempt to upgrade to
#           the release that immediately succeeds the currently-running
#           release.
#  lts    - Check to see if a new LTS release is available.  The upgrader
#           will attempt to upgrade to the first LTS release available after
#           the currently-running one.  Note that this option should not be
#           used if the currently-running release is not itself an LTS
#           release, since in that case the upgrader won't be able to
#           determine if a newer release is available.
Prompt=lts

If not, change it to lts and save the file.

STEP 3: PERFORM UBUNTU 18.04 LTS UPGRADE

Now that your system is ready, run the commands below to begin Ubuntu upgrade to the latest development release..

sudo do-release-upgrade -d

Follow the on-screen instructions…. y = yes and N= No. When prompted whether you wish to upgrade type y for yes.

Do you want to start the upgrade?

1 installed package is no longer supported by Canonical. You can
still get support from the community.

2 packages are going to be removed. 64 new packages are going to be
installed. 394 packages are going to be upgraded.

You have to download a total of 234 M. This download will take about
1 minute with your connection.

Installing the upgrade can take several hours. Once the download has
finished, the process cannot be canceled.

 Continue [yN]  Details [d] y

Wait for all the newer packages to be downloaded… this may take a while depending on your internet connection speed. After all packages are downloaded, your system will begin upgrading immediately….

Once new packages have finished installing, you’ll be asked whether to remove obsolete packages. Type y here. If you have a system that you have customized, you may wish to enter d to view the list… just in case you may need to reinstall..

Remove obsolete packages?

53 packages are going to be removed.

 Continue [yN]  Details [d]y

Wait for the process to complete, the reboot to finish.. you’ll be notify to reboot.

Restart required

To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.

Continue [yN] y

When everything is setup correctly, you system should be upgraded to the latest Ubuntu release.

Welcome to Ubuntu 18.04 LTS (GNU/Linux 4.15.0-19-generic x86_64)

Link --> UPGRADE UBUNTU 16.04 LTS TO UBUNTU 18.04 LTS SERVER

2
1

I upgraded safely from 16.04 to 18.04 and here is what I did :

Edit the repo file :

sudo nano /etc/apt/sources.list

Replace the codename by the actual code name you want to upgrade to :

If you are using nano use ^\ as shortcut, and since I was from 16.04 I replaced the word xenial to bionic

Save the file.

Then make Ubuntu aware of this change :

sudo apt update

Then make the upgrade :

sudo apt dist-upgrade

Then if you wish, you can only let 3 kernel versions by :

sudo apt autoremove
0

Nothing worked. After trying and the suggested solutions, finally, I had downloaded the packages manually, copied them into /var/cache/apt/archives and removed the broken packages from /var/cache/apt/archives/partial.

2
  • and then, did that help? Aug 16, 2018 at 15:48
  • Yeah, I am replying to you with my newly upgraded 18.04 machine :)
    – Ravi Misra
    Aug 17, 2018 at 1:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .