LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lite Tweaks - Suggestions welcomed
#18
So far it's working with an old  3.15.0 kernel.
[Image: HKYMQh1.png]
So I've used this to uninstall it.
Code:
#! /bin/bash
#--------------------------------------------------------------------------------------------------------
# Name: Old Kernel Remover GUI
# Description: Prints out old kernels and removes them.
# Authors: Misko_2083, Jerry Bezencon
# Date: September 9th, 2014
# Website: https://www.freecinema2022.gq
#--------------------------------------------------------------------------------------------------------
ic="/usr/share/icons/zenity-llcc.png"

CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
LINUXPKG="linux-(image|headers|ubuntu-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)

# sed command adds all FALSE entries in the column 'Select'
# separator sets the separator in the output of the checklist, could be a new line \n or anything else
selection=$(echo "$OLDKERNELS" | sed -e 's/^/FALSE\n/' | zenity --window-icon="$ic" --list --checklist --separator="" --width=890 --height=400   --column='Select' --column='Kernel' \
--text=' ' --title="Lite Cleaner" --ok-label="Clean" --cancel-label="Quit" )


echo $selection | grep linux-headers-linuxlite-3.15.0
if [ $? = 0 ];then
gksudo -g --message '.' "sudo apt-get purge linux-headers-linuxlite-3.15.0 --force-yes -y" | zenity --progress --title="removing kernel"  --text="Uninstalling headers 3.15.0..." --pulsate --width=400 --auto-close --auto-kill
fi

echo $selection | grep linux-image-linuxlite-3.15.0
if [ $? = 0 ];then
gksudo -g --message '.' "sudo apt-get purge linux-image-linuxlite-3.15.0 --force-yes -y" | zenity --progress --title="removing kernel"  --text="Uninstalling image 3.15.0..." --pulsate --width=400 --auto-close --auto-kill
fi
And it worked. When I start the script again I get this:
[Image: zPjko1m.png]
Reply


Messages In This Thread
Lite Tweaks - Suggestions welcomed - by Valtam - 09-04-2014, 08:51 PM
Re: Lite Cleaner - Suggestions welcomed - by Alex - 09-04-2014, 10:17 PM
Re: Lite Cleaner - Suggestions welcomed - by Alex - 09-06-2014, 11:17 PM
Re: Lite Cleaner - Suggestions welcomed - by misko_2083 - 09-09-2014, 12:44 AM
Re: Lite Cleaner - Suggestions welcomed - by Alex - 09-16-2014, 01:05 AM
Re: Lite Cleaner - Suggestions welcomed - by Alex - 09-16-2014, 07:40 AM
Re: Lite Cleaner - Suggestions welcomed - by Alex - 09-16-2014, 10:45 AM
Re: Lite Cleaner - Suggestions welcomed - by bobw - 09-16-2014, 04:55 PM
Re: Lite Cleaner - Suggestions welcomed - by mpig - 09-17-2014, 07:16 AM
Re: Lite Cleaner - Suggestions welcomed - by bobw - 09-17-2014, 07:45 AM
Re: Lite Cleaner - Suggestions welcomed - by Alex - 09-18-2014, 08:20 AM
Re: Lite Cleaner - Suggestions welcomed - by eightbit - 09-29-2014, 05:11 AM
Re: Lite Cleaner - Suggestions welcomed - by bobw - 11-04-2014, 09:32 AM
Re: Lite Cleaner - Suggestions welcomed - by bobw - 11-04-2014, 01:47 PM
Re: Lite Tweaks - Suggestions welcomed - by N4RPS - 02-20-2015, 12:40 PM
Re: Lite Tweaks - Suggestions welcomed - by N4RPS - 02-22-2015, 11:48 PM
Re: Lite Tweaks - Suggestions welcomed - by Shady - 02-26-2015, 04:04 PM
Re: Lite Tweaks - Suggestions welcomed - by Hans - 03-02-2015, 11:27 AM
Re: Lite Tweaks - Suggestions welcomed - by Shady - 03-02-2015, 04:07 PM
Re: Lite Tweaks - Suggestions welcomed - by nomko - 06-02-2016, 07:09 AM
Re: Lite Tweaks - Suggestions welcomed - by MS - 10-09-2019, 04:36 AM
Re: Lite Tweaks - Suggestions welcomed - by MS - 10-09-2019, 02:26 PM
Re: Lite Tweaks - Suggestions welcomed - by MS - 10-12-2019, 02:53 AM
Re: Lite Tweaks - Suggestions welcomed - by MS - 10-12-2019, 10:46 AM

Forum Jump:


Users browsing this thread: 50 Guest(s)