Skip to content

Instantly share code, notes, and snippets.

@colby
Created April 28, 2016 19:17
Show Gist options
  • Save colby/5f980d3ba3977203391dedb444d0f444 to your computer and use it in GitHub Desktop.
Save colby/5f980d3ba3977203391dedb444d0f444 to your computer and use it in GitHub Desktop.
A package upgrade checking script.
#!/bin/bash
file=/tmp/packages
/usr/lib/update-notifier/apt-check --human-readable
[ -f /var/run/reboot-required ] && echo -e "\nA reboot is required!"
apt list --upgradable > $file 2>/dev/null
echo -e "\nNormal package updates:"
pr -T -c3 -a <(grep 'update' $file | cut -d/ -f1)
echo -e "\nSecurity package updates:"
pr -T -c3 -a <(grep 'security' $file | cut -d/ -f1)
@parhamr
Copy link

parhamr commented Apr 28, 2016

👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment