rendered paste body#!/bin/sh
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"
/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""Deleting traces...""\033[0m"
rm /home/*/.thumbnails/normal/*
rm /home/*/.thumbnails/large/*
rm /home/*/.thumbnails/fail/gnome-thumbnail-factory/*
rm logs/*
rm .xchat2/xchatlogs/*
rm -rf /tmp/*
rm .galeon/mozilla/galeon/Cache/*
rm .galeon/history2.xml
rm /home/*/.mozilla/firefox/lba29qun.default/Cache/*
rm /home/*/.mozilla/firefox/lba29qun.default/history.dat
rm -rf /home/*/.macromedia/*
rm .w3m/*
rm .kde/share/apps/ktorrent/log*
rm .kde/share/apps/RecentDocuments/*
rm .kde/share/config/konq_history
rm /home/*/.recently-used
rm /home/*/.recently-used.xbel
rm -rf .googleearth/Temp/*
rm -rf .googleearth/Cache/*
rm -rf .googleearth/Registry/google/googleearthplus/User/cache/*
rm .googleearth/Registry/google/googleearthplus/User/search/*
rm -rf /home/*/.Trash/*
rm .fvwm-crystal/.FvwmConsole-History
rm /home/*/.bash_history
history -c
echo -e "\033[1;33m""Script Finished!""\033[0m"
exit 0