Ubuntu – How to configure an out of date system to install software with apt?


Having an out-of-date system, yet looking to install alpine with apt.

thufir@dur:~$ sudo apt-get update
Hit:1 http://old-releases.ubuntu.com/ubuntu cosmic InRelease
Reading package lists... Done
thufir@dur:~$ apt-cache search alpine
nano - small, friendly text editor inspired by Pico
thufir@dur:~$ head -n 1 /etc/apt/sources.list
deb http://old-releases.ubuntu.com/ubuntu cosmic main
thufir@dur:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.10
Release:    18.10
Codename:   cosmic

I'm missing repo's? Assuming so, what needs to be added to simply install alpine?

Best Answer

Use 18.04 sources.list:

sudo mv /etc/apt/sources.list /home/user/sources.list.bk
sudo vi /etc/apt/sources.list

Paste the repositories to it:

deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse

Then update packages and install alpine:

sudo apt update && sudo apt install alpine

Alpine is installed and starts correctly:

$ alpine
Creating subdirectory "/home/spacer/mail" where Alpine will store
its mail folders.
Alpine finished -- Closed empty folder "INBOX"

user@ubuntu18:~$ cat /etc/lsb-release 

Also, as FedonKadifeli suggested in comment, you could do the next:

If you want to continue using an outdated release then edit /etc/apt/sources.list and change archive.ubuntu.com and security.ubuntu.com to old-releases.ubuntu.com

But it as it is actually didn't work for me.