Skip to content

Instantly share code, notes, and snippets.

@Neolot
Created May 10, 2025 00:36
Show Gist options
  • Save Neolot/5a57f9800fa87ca22da3edd8dd9f4d15 to your computer and use it in GitHub Desktop.
Save Neolot/5a57f9800fa87ca22da3edd8dd9f4d15 to your computer and use it in GitHub Desktop.
Simple update script for Debian-based distribution (Debian, Ubuntu, etc)
#!/usr/bin/sh
sudo apt update && sudo apt list --upgradable
echo 'Do you want to run the update? (Y/n)'
read INPUT
case $INPUT in
n)
echo 'Update cancelled.'
exit
;;
esac
sudo apt upgrade && sudo apt autoremove && sudo snap refresh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment