#!/bin/zsh if [ $USER != root ]; then echo "Error: must be root" echo "Exiting..." exit 0 fi OLDCONF=$(dpkg -l|grep "^rc"|awk '{print $2}') echo -e "\033[1;33m""Cleaning apt cache...""\033[0m" /usr/bin/aptitude clean echo -e "\033[1;33m""Deleting old config files...""\033[0m" sudo /usr/bin/aptitude purge $OLDCONF echo -e "\033[1;33m""Emptying every trashes...""\033[0m" if [ -e /home/*/.local/share/Trash/*/** ]; then rm -r /home/*/.local/share/Trash/*/** fi if [ -e /root/.local/share/Trash/*/** ]; then rm -rf /root/.local/share/Trash/*/** fi echo -e "\033[1;33m""Script Finished!""\033[0m"