Skip to content

Instantly share code, notes, and snippets.

@Arinerron
Created August 15, 2016 06:09
Show Gist options
  • Save Arinerron/963a362a285e93b54950e20ffb9eb0f7 to your computer and use it in GitHub Desktop.
Save Arinerron/963a362a285e93b54950e20ffb9eb0f7 to your computer and use it in GitHub Desktop.
My user-friendly updating script for Linux. Keeps the computer up-to-date. Perhaps I should make a cron job to make this run at midnight? :P
# Arinerron's update script
# License: Nope. This code is easily recreatable, and I spent like 5 minutes writing it. I couldn't care less if you claimed this code as your or somehow made millions off of this or whatever. Have fun. :P
export COLOR_NC='\e[0m';
export COLOR_GREEN='\e[0;32m';
clear;
echo -e "$COLOR_GREEN""[Update] ""$COLOR_NC""Updating package listing...";
sudo apt-get -qq update;
echo -e "$COLOR_GREEN""[Update] ""$COLOR_NC""Upgrading software...";
sudo apt-get -qq -y upgrade > /dev/null;
# For yum users only:
# sudo yum update > /dev/null;
echo -e "$COLOR_GREEN""[Update] ""$COLOR_NC""Upgrading kernel...";
sudo apt-get -qq -y dist-upgrade > /dev/null;
echo -e "$COLOR_GREEN""[Update] ""$COLOR_NC""Removing old packages...";
sudo apt-get -qq -y autoremove > /dev/null;
echo -e "$COLOR_GREEN""[Update] ""$COLOR_NC""Software and Kernel upgrade finished!";
@Arinerron
Copy link
Author

Na, that's a terrible idea actually. And so is auto removing packages

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