#!/bin/bash
#Simple clear junk files..from selected paths
#
#Made this quick script to clear junk on the 6 distros currently am running for testing
#noticed lots of junk ie deb packages, files ,old slack modules and old logs
#make sure you are removing right files DOUBLE check PATHS are CORRECT
#Purpose:To free up space remove unwanted junk
#add directory as you wish
#Chmod u+x clear.sh
#Run as Root
#USAGE:$ ./clear.sh
#Script by Kenny GSO
#www.governmentsecurity.org/forum
#date:22/1/2008
#You may edit to your requirements..just be careful!!!!!
#Modify to current flavour
echo "Warning this will DELETE and Clean logs and old Cache etc from Set
Paths "
echo -n "Are you SURE you want to continue. (y/n): "; read Answer
if [ $Answer = "n" ]; then
echo "OK..Quiting Script Process Cancelled..."
exit
fi
echo Cleaning old files............
echo "Please wait Files are being deleted.!!!!!!.."
rm -f /var/cache/apt/archives/*.deb
rm -f /var/log/*.old
rm -f /var/log/*.gz
rm -f /var/log/*.1
echo Cleaned Listed Junk files.....
echo 1 = .deb old archives
echo 2 = .old logs
echo 3 = .gz old logs
echo 4 = .1 old logs
echo Finished...Exiting
exit
#END