- ##cb-clean##
- #!/bin/bash
- SDIR="/home/$USER/bin/cb-lib-dir"
- terminator --title="#! Cleaning Script" --command="$sdir/cb-lib-clean"
- ##cb-lib-clean##
- #!/bin/bash
- clear
- echo "
- REMOVE RESIDUAL CONFIGURATIONS AND FREE-UP SPACE
- -------------------------
- Would you like to clean your system?
- If you choose to do this, this script will execute the commands:
- sudo apt-get update && sudo apt-get clean
- sudo apt-get autoremove
- sudo apt-get purge $(dpkg -l | grep '^rc' | awk '{print $2}')
- Hit any key to clean your system, or \"x\" to exit..."
- read -n1 a
- a=`echo $a | tr '[A-Z]' '[a-z]'`
- if [ "$a" != "x" ]; then
- echo ""
- sudo apt-get update && sudo apt-get clean
- sudo apt-get autoremove
- sudo apt-get purge $(dpkg -l | grep '^rc' | awk '{print $2}')
- else
- exit 0
- fi
- echo ""
- read -p "Script terminated, hit [ENTER] key to exit."
- exit 0
Posted by VDP76 on Thu 12th Jul 21:12 (modification of post by view diff)
download | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.