I tried this first a year or two ago and came across the same problem - a problem with the rfkill package, one for which I have no use anyway.

Last Friday I had three desktop Ubuntu 16.04 systems, set up at three different times. On Saturday one updated smoothly to 18.04 using the proper 'sudo do-release-upgrade' method.

Both the others failed with the nasty 'Hash Sum mismatch' error on rfkill. As one did last year, when I learnt that it was a repository sync problem that would clear up later.

I have googled widely and implemented (I think) every solution. I have cleaned, updated, upgraded, done dist-upgrade, autoremoved, wiped /var/lib/apt/lists and /var/cache/apt/archives, and made sure both  Acquire-by-hash  and  Acquire::CompressionTypes::Order::=gz  are operating.

I have downloaded (with wget) both the 4945 bytes of the xenial version and the 5005 bytes of the bionic version and installed them at separate times in /var/cache/apt/archives before trying the update again.

Every time, it barfs on rfkill with a 'Hash Sum mismatch'.

I find in my notes three other reported sizes for rfkill: 5045, 8530, 8580 and 8612 bytes.

Since I don't need rfkill, can anyone suggest any way to get over this?

Maybe the problem is that I purged it half way through a long weekend of wrestling. It refuses to reinstall with the following message.
====================================================================================
Need to get 8,530 B of archives.
After this operation, 33.8 kB of additional disk space will be used.
Get:1 http://gb.archive.ubuntu.com/ubuntu xenial-updates/main amd64 rfkill amd64 0.5-1ubuntu3.1 [8,530 B]
Err:1 http://gb.archive.ubuntu.com/ubuntu xenial-updates/main amd64 rfkill amd64 0.5-1ubuntu3.1
Hash Sum mismatch
Fetched 4,945 B in 0s (238 kB/s)
E: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/pool/main/r/rfkill/rfkill_0.5-1ubuntu3.1_amd64.deb  Hash Sum mismatch
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
===================================================================================
and I note that it fetched only around half of what it needed, but it seems to always do this. When I try again with
apt --fix-missing install rfkill  I get the same with a final error: E: Internal Error, ordering was unable to handle the media swap




The usual error message involves two GETs:
====================================================================================
Get:1 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 rfkill amd64 2.31.1-0.4ubuntu3.6 [24.8 kB]
Err http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 rfkill amd64 2.31.1-0.4ubuntu3.6
Hash Sum mismatch
Fetched 4,945 B in 0s (0 B/s)

Get:1 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 rfkill amd64 2.31.1-0.4ubuntu3.6 [24.8 kB]
Err http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 rfkill amd64 2.31.1-0.4ubuntu3.6
Hash Sum mismatch
Fetched 5,005 B in 0s (0 B/s)

Could not download the upgrades
======================================================================================

though at times there is a second occurrence of the second four-line message.


--
Christopher Dawkins
Garnetts Corner, Jollyboys Lane North, Felsted, Dunmow, Essex  CM6 3DU
07816 821659