PDA

View Full Version : Cleaner for Kali



MasterButcher
2013-06-11, 21:24
Little cleaner for Kali linux.
Clean apt cache.
Removing old config files.
Removing old kernels.
Emptying every trashes.

You can save script on Desktop.
Make it executable and clean kali linux.

Ex:
root@kali:~/Desktop# ./kali_cleaner.sh

Picture:http://postimg.org/image/xreehsql1/
Download:
https://github.com/MasterButcher/kali-cleaner
or you can use command in terminal:
root@kali:~# git clone https://github.com/MasterButcher/kali-cleaner.git


By MasterButcher :D

R.3volv3.R
2013-06-12, 01:29
why this remove kernel current use ?
http://imageshack.us/scaled/modthumb/843/removef.png (http://imageshack.us/photo/my-images/843/removef.png/) Uploaded with ImageShack.us (http://imageshack.us)

MasterButcher
2013-06-12, 19:25
Yes,remove old kernel current use....Fixed...

R.3volv3.R
2013-06-13, 16:57
nice job bro.. fixed ..

r3d
2013-06-15, 14:38
Nice job! just did it and work perfect.

MasterButcher
2013-06-16, 19:29
Thanks friend :D

AfterBurn
2013-06-21, 17:36
Good work.

Backtrack Dragon
2013-06-24, 17:00
great job... thanks for share...

anashlali
2013-07-06, 22:12
nice nice work man!!!

dintho
2014-03-05, 07:12
hey,

dude awesome script i wanted to send you something i was able to fix on the old kernels and i wanted to share. i am a AIX admin by day so if any of the changes are unsafe for kali ill leave that to you to determine i know this worked for me and should work across all kernels

if you have any questions feel free to reply

i truly hope this helps

Dintho



Code Changes
"################################################"
"## ORGINAL"
CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
LINUXPKG="linux-(image|headers|debian-modules|restricted-modules)"
METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
OLDKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL)


echo "################################################"
echo "## NEW"
CURKERNEL=$(uname -r)
OLDKERNELS=$(dpkg -l|egrep '^ii linux-(im|he)'|awk '{print $2}'|grep -v `uname -r`)



################################################## ################################################## ################################################## #########################
################################################## ################################################## ################################################## #########################
Ouput difference on a AMD 64 bit kernel (custom colors for debuging)

both are using this code
echo -e $CYAN "Curent Kernel = $CURKERNEL"$ENCOLOR
echo -e $PURPLE "Old Kernels = $OLDKERNELS" $ENDCOLOR


################################################
## ORGINAL
Curent Kernel = 3.12164
Old Kernels = linux-image-3.12-kali1-amd64
linux-image-3.7-trunk-amd64
linux-image-amd64

################################################
## NEW
Curent Kernel = 3.12-kali1-amd64
Old Kernels = linux-image-3.7-trunk-amd64
linux-image-amd64

carmila
2014-03-07, 08:24
nice one.. thanks for this script.. :)

tr00n3r
2014-03-15, 13:24
awesome! thanks