Skip to content

Instantly share code, notes, and snippets.

@iliaselmatani
Created May 26, 2017 16:50
Show Gist options
  • Save iliaselmatani/6b4a3064904fca6072d49c7e53f53204 to your computer and use it in GitHub Desktop.
Save iliaselmatani/6b4a3064904fca6072d49c7e53f53204 to your computer and use it in GitHub Desktop.
GNU/Linux upgrade from Jessie to Raspbian Stretch
#!/bin/bash
#Let APT know that it's not being run interactively
DEBIAN_FRONTEND=noninteractive
#Update and upgrade
apt-get update
apt-get upgrade -y --force-yes -qq
apt-get dist-upgrade -y --force-yes -qq
#System check
dpkg -C
apt-mark showhold
#Update the package repository to Debian Stretch
sed -i 's/jessie/stretch/g' /etc/apt/sources.list
#Upgrade
apt-get update
apt-get upgrade -y --force-yes -qq
apt-get dist-upgrade -y --force-yes -qq
#Done, let's reboot
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment