How To: Fix apt update in Ubuntu 19.04

Ubuntu 19.04 Ubuntu 19.04

I needed to install something on one of my home automation servers running Ubuntu 19.04, and suddenly couldn’t - lots of errors with Disco updates and packages not found:

root@server:~ # apt-get update
Ign:1 http://nl.archive.ubuntu.com/ubuntu disco InRelease
Ign:2 http://security.ubuntu.com/ubuntu disco-security InRelease
Ign:3 http://archive.ubuntu.com/ubuntu disco InRelease
Err:4 http://security.ubuntu.com/ubuntu disco-security Release
  404  Not Found [IP: 91.189.88.152 80]
Ign:5 http://archive.ubuntu.com/ubuntu disco-updates InRelease
Err:6 http://nl.archive.ubuntu.com/ubuntu disco Release
  404  Not Found [IP: 213.136.12.213 80]
Err:7 http://archive.ubuntu.com/ubuntu disco Release
  404  Not Found [IP: 91.189.88.142 80]
Err:8 http://archive.ubuntu.com/ubuntu disco-updates Release
  404  Not Found [IP: 91.189.88.142 80]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu disco-security Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://nl.archive.ubuntu.com/ubuntu disco Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu disco Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu disco-updates Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

What’s the problem with updates in Ubuntu 19.04?

Turns out, 19.04 is too old now - so it’s been officially migrated from archive to old-releases repos in Ubuntu.

How To Fix The Missing Ubuntu 19.04 Updates

You need to edit the /etc/apt/sources.list file. Update the following lines:

/etc/apt/sources.list

to be:

deb http://old-releases.ubuntu.com/ubuntu disco main restricted
deb http://old-releases.ubuntu.com/ubuntu disco-updates main restricted
deb http://old-releases.ubuntu.com/ubuntu disco-security main restricted

Aftet this apt update will work just fine:

root@server:~ # apt-get update
Ign:1 http://nl.archive.ubuntu.com/ubuntu disco InRelease
Ign:2 http://security.ubuntu.com/ubuntu disco-security InRelease
Err:3 http://security.ubuntu.com/ubuntu disco-security Release
  404  Not Found [IP: 91.189.88.152 80]
Err:4 http://nl.archive.ubuntu.com/ubuntu disco Release
  404  Not Found [IP: 213.136.12.213 80]
Get:5 http://old-releases.ubuntu.com/ubuntu disco InRelease [257 kB]
Get:6 http://old-releases.ubuntu.com/ubuntu disco-updates InRelease [97.5 kB]
Get:7 http://old-releases.ubuntu.com/ubuntu disco-security InRelease [97.5 kB]
Get:8 http://old-releases.ubuntu.com/ubuntu disco/main amd64 Packages [995 kB]
Get:9 http://old-releases.ubuntu.com/ubuntu disco/main i386 Packages [981 kB]
Get:10 http://old-releases.ubuntu.com/ubuntu disco/main Translation-en [509 kB]
Get:11 http://old-releases.ubuntu.com/ubuntu disco/main amd64 DEP-11 Metadata [499 kB]
Get:12 http://old-releases.ubuntu.com/ubuntu disco/main DEP-11 48x48 Icons [97.2 kB]
Get:13 http://old-releases.ubuntu.com/ubuntu disco/main DEP-11 64x64 Icons [179 kB]
Get:14 http://old-releases.ubuntu.com/ubuntu disco/main amd64 c-n-f Metadata [30.0 kB]
Get:15 http://old-releases.ubuntu.com/ubuntu disco/restricted i386 Packages [11.1 kB]
Get:16 http://old-releases.ubuntu.com/ubuntu disco/restricted amd64 Packages [14.0 kB]
Get:17 http://old-releases.ubuntu.com/ubuntu disco/restricted Translation-en [4,960 B]
Get:18 http://old-releases.ubuntu.com/ubuntu disco/restricted amd64 c-n-f Metadata [348 B]
Get:19 http://old-releases.ubuntu.com/ubuntu disco-updates/main amd64 Packages [259 kB]
Get:20 http://old-releases.ubuntu.com/ubuntu disco-updates/main i386 Packages [245 kB]
Get:21 http://old-releases.ubuntu.com/ubuntu disco-updates/main Translation-en [111 kB]
Get:22 http://old-releases.ubuntu.com/ubuntu disco-updates/main amd64 DEP-11 Metadata [134 kB]
Get:23 http://old-releases.ubuntu.com/ubuntu disco-updates/main DEP-11 48x48 Icons [19.4 kB]
Get:24 http://old-releases.ubuntu.com/ubuntu disco-updates/main DEP-11 64x64 Icons [44.2 kB]
Get:25 http://old-releases.ubuntu.com/ubuntu disco-updates/main amd64 c-n-f Metadata [8,080 B]
Get:26 http://old-releases.ubuntu.com/ubuntu disco-updates/restricted amd64 Packages [1,560 B]
Get:27 http://old-releases.ubuntu.com/ubuntu disco-updates/restricted Translation-en [628 B]
Get:28 http://old-releases.ubuntu.com/ubuntu disco-updates/restricted amd64 c-n-f Metadata [116 B]
Get:29 http://old-releases.ubuntu.com/ubuntu disco-security/main amd64 Packages [188 kB]
Get:30 http://old-releases.ubuntu.com/ubuntu disco-security/main i386 Packages [176 kB]
Get:31 http://old-releases.ubuntu.com/ubuntu disco-security/main Translation-en [77.3 kB]
Get:32 http://old-releases.ubuntu.com/ubuntu disco-security/main amd64 DEP-11 Metadata [37.6 kB]
Get:33 http://old-releases.ubuntu.com/ubuntu disco-security/main DEP-11 48x48 Icons [12.9 kB]
Get:34 http://old-releases.ubuntu.com/ubuntu disco-security/main DEP-11 64x64 Icons [27.4 kB]
Get:35 http://old-releases.ubuntu.com/ubuntu disco-security/main amd64 c-n-f Metadata [5,000 B]
Get:36 http://old-releases.ubuntu.com/ubuntu disco-security/restricted amd64 Packages [1,560 B]
Get:37 http://old-releases.ubuntu.com/ubuntu disco-security/restricted Translation-en [628 B]
Get:38 http://old-releases.ubuntu.com/ubuntu disco-security/restricted amd64 c-n-f Metadata [116 B]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu disco-security Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://nl.archive.ubuntu.com/ubuntu disco Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Enjoy!

See Also




Contact Me

Follow me on Facebook, Twitter or Telegram:
Recommended
I learn with Educative: Educative
IT Consultancy
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!

Recent Tweets