Further improvement of kclean for debian machines

This commit is contained in:
la-magra 2014-09-02 10:54:20 -05:00
parent 737c39d860
commit 5d3dfb81f9

View File

@ -68,7 +68,7 @@ if [[ $use_sudo -eq 1 ]]; then
# Remove ALL kernel images and headers EXCEPT the one in use # Remove ALL kernel images and headers EXCEPT the one in use
alias kclean='sudo aptitude remove -P "?and(~i~nlinux-(ima|hea),\ alias kclean='sudo aptitude remove -P "?and(~i~nlinux-(ima|hea),\
?not(?or(~n`uname -r | cut -d'\''-'\'' -f-2`,\ ?not(?or(~n`uname -r | cut -d'\''-'\'' -f-2`,\
~n(linux-(virtual|headers-virtual|headers-generic|image-virtual|image-generic)))))"' ~n(linux-(virtual|headers-virtual|headers-generic|image-virtual|image-generic|image-`dpkg --print-architecture`)))))"'
# commands using su ######### # commands using su #########
else else
@ -108,7 +108,7 @@ else
# Remove ALL kernel images and headers EXCEPT the one in use # Remove ALL kernel images and headers EXCEPT the one in use
alias kclean='su -lc '\''aptitude remove -P "?and(~i~nlinux-(ima|hea),\ alias kclean='su -lc '\''aptitude remove -P "?and(~i~nlinux-(ima|hea),\
?not(?or(~n`uname -r | cut -d'\''-'\'' -f-2`,\ ?not(?or(~n`uname -r | cut -d'\''-'\'' -f-2`,\
~n(linux-(virtual|headers-virtual|headers-generic|image-virtual|image-generic)))))"'\'' root' ~n(linux-(virtual|headers-virtual|headers-generic|image-virtual|image-generic|image-`dpkg --print-architecture`)))))"'\'' root'
fi fi
# Completion ################################################################ # Completion ################################################################