jason@home:~$

Script to update my desktop Ubuntu system

Tags: Linux Bash

Just a stupidly simple script that I use to update my development workstation at home. This would probably also work on a server as well as all it does is update its repo, list the upgradable packages and ask if you want ot upgrade them.

#!/usr/bin/env bash
sudo apt update
sudo apt list --upgradable
read -p "Upgrade Packages? " -n 1 -r
echo    # (optional) move to a new line
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
    exit 1
fi
sudo apt upgrade -y