Skip to content

Instantly share code, notes, and snippets.

@zerjioang
Created January 25, 2018 07:11
Show Gist options
  • Save zerjioang/fb9e013f4af9b85d4335941a65c926aa to your computer and use it in GitHub Desktop.
Save zerjioang/fb9e013f4af9b85d4335941a65c926aa to your computer and use it in GitHub Desktop.
Ubuntu EOL distribution update process
#get codename
echo "Getting ubuntu codename..."
CODENAME=$(lsb_release -c)
#add patched eol sources to list /etc/apt/sources.list
echo "Patching sources.list..."
echo "## EOL upgrade sources.list \
# Required \
deb http://old-releases.ubuntu.com/ubuntu/ $CODENAME main restricted universe multiverse \
deb http://old-releases.ubuntu.com/ubuntu/ $CODENAME-updates main restricted universe multiverse \
deb http://old-releases.ubuntu.com/ubuntu/ $CODENAME-security main restricted universe multiverse \
\
# Optional \
#deb http://old-releases.ubuntu.com/ubuntu/ $CODENAME-backports main restricted universe multiverse \
" >> /etc/apt/sources.list
#update lists again
sudo apt update
sudo apt-get -y dist-upgrade
sudo do-release-upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment