Peppermint OS

General => General Discussion => Topic started by: DAMIEN1307 on January 27, 2018, 06:29:54 am

Title: remove kernel headers?
Post by: DAMIEN1307 on January 27, 2018, 06:29:54 am
hi folks...is it possible to be able to remove the 4.8, 4.10, and the 4.11 kernel series headers from the update manager kernels section...obviously they are now outmoded, non supported etc and i would like to pare down the list if possible...thanks...DAMIEN
Title: Re: remove kernel headers?
Post by: PCNetSpec on January 27, 2018, 06:45:33 am
Code: [Select]
sudo apt-get autoremoveshould get rid of the orphaned ones.
Title: Re: remove kernel headers?
Post by: DAMIEN1307 on January 27, 2018, 07:21:09 am
hi PCNetSpec...i use sudo apt autoremove all the time in the terminal after uninstalling programs etc, i do not want but it doesnt remove any of the headers out of the update manager...how is that terminal command going to remove kernel headers from there?...thanx...DAMIEN
Title: Re: remove kernel headers?
Post by: PCNetSpec on January 27, 2018, 07:29:13 am
The update manager is probably picking up headers that have been uninstalled but the config files left behind (ie. removed instead of purged) .. this is no big deal as the configs are tiny.

But if you wanna be sure, what's the output from:
Code: [Select]
dpkg -l | grep 4.8.0and
Code: [Select]
dpkg -l | grep 4.10.0and
Code: [Select]
dpkg -l | grep 4.13.0
Title: Re: remove kernel headers?
Post by: DAMIEN1307 on January 27, 2018, 08:40:07 am
here it is...i also included the 4.11 series that needs to go as well...the 4.13 series is what is active...

damien@damien ~ $ dpkg -l | grep 4.8.0
ii  guvcview                                    2.0.5+ubuntu2~ppa1+1418-0ubuntu1~201702081552~ubuntu16.04.1 amd64        Gtk3 base UVC Viewer
ii  libguvcview-2.0-0:amd64                     2.0.5+ubuntu2~ppa1+1418-0ubuntu1~201702081552~ubuntu16.04.1 amd64        GUVCView - runtime


damien@damien ~ $ dpkg -l | grep 4.10.0
rc  linux-image-4.10.0-40-generic               4.10.0-40.44~16.04.1                                        amd64        Linux kernel image for version 4.10.0 on 64 bit x86 SMP
rc  linux-image-extra-4.10.0-40-generic         4.10.0-40.44~16.04.1                                        amd64        Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP


damien@damien ~ $ dpkg -l | grep 4.11.0
ii  gir1.2-javascriptcoregtk-3.0:amd64          2.4.11-0ubuntu0.1                                           amd64        JavaScript engine library from WebKitGTK+ - GObject introspection data
ii  gir1.2-webkit-3.0:amd64                     2.4.11-0ubuntu0.1                                           amd64        Web content engine library for GTK+ - GObject introspection data
ii  libjavascriptcoregtk-1.0-0:amd64            2.4.11-0ubuntu0.1                                           amd64        JavaScript engine library from WebKitGTK+
ii  libjavascriptcoregtk-3.0-0:amd64            2.4.11-0ubuntu0.1                                           amd64        JavaScript engine library from WebKitGTK+
ii  libwebkitgtk-1.0-0:amd64                    2.4.11-0ubuntu0.1                                           amd64        Web content engine library for GTK+
ii  libwebkitgtk-1.0-common                     2.4.11-0ubuntu0.1                                           all          Web content engine library for GTK+ - data files
ii  libwebkitgtk-3.0-0:amd64                    2.4.11-0ubuntu0.1                                           amd64        Web content engine library for GTK+
ii  libwebkitgtk-3.0-common                     2.4.11-0ubuntu0.1                                           all          Web content engine library for GTK+ - data files


damien@damien ~ $ dpkg -l | grep 4.13.0
ii  linux-generic-hwe-16.04                     4.13.0.32.52                                                amd64        Complete Generic Linux kernel and headers
ii  linux-headers-4.13.0-32                     4.13.0-32.35~16.04.1                                        all          Header files related to Linux kernel version 4.13.0
ii  linux-headers-4.13.0-32-generic             4.13.0-32.35~16.04.1                                        amd64        Linux kernel headers for version 4.13.0 on 64 bit x86 SMP
ii  linux-headers-generic-hwe-16.04             4.13.0.32.52                                                amd64        Generic Linux kernel headers
rc  linux-image-4.13.0-26-generic               4.13.0-26.29~16.04.2                                        amd64        Linux kernel image for version 4.13.0 on 64 bit x86 SMP
rc  linux-image-4.13.0-31-generic               4.13.0-31.34~16.04.1                                        amd64        Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii  linux-image-4.13.0-32-generic               4.13.0-32.35~16.04.1                                        amd64        Linux kernel image for version 4.13.0 on 64 bit x86 SMP
rc  linux-image-extra-4.13.0-26-generic         4.13.0-26.29~16.04.2                                        amd64        Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
rc  linux-image-extra-4.13.0-31-generic         4.13.0-31.34~16.04.1                                        amd64        Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
ii  linux-image-extra-4.13.0-32-generic         4.13.0-32.35~16.04.1                                        amd64        Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
ii  linux-image-generic-hwe-16.04               4.13.0.32.52                                                amd64        Generic Linux kernel image
damien@damien ~ $
Title: Re: remove kernel headers?
Post by: VinDSL on January 27, 2018, 08:57:59 am
I'm as lazy as the next guy.

I'm doing extended weekly maintenance right now, on multiple machines. Don't want to waste a bunch of time.

Here's what I do (using this machine as an example):

Code: [Select]
╭─vindsl@Boogaloo-5 ~ 
╰─➤  dpkg -l | grep '^rc' | awk '{print $2}' | xargs sudo apt-get purge   123 ↵
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  crda iw libstd-rust-1.17 wireless-regdb
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  libglib2.0-0:i386* libgssapi-krb5-2:i386* libice6:i386* libjbig0:i386*
  liblcms2-2:i386* libldap-2.4-2:i386* libmng2:i386* libqtcore4:i386*
  libsasl2-modules:i386* libsm6:i386* libssl1.0.0:i386* libx11-6:i386*
  libxau6:i386* libxext6:i386* libxrender1:i386* libxt6:i386*
0 upgraded, 0 newly installed, 16 to remove and 3 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Abort.
╭─vindsl@Boogaloo-5 ~ 
╰─➤  dpkg -l | grep '^rc' | awk '{print $2}' | sudo xargs dpkg --purge    123 ↵
(Reading database ... 284190 files and directories currently installed.)
Removing libglib2.0-0:i386 (2.48.2-0ubuntu1) ...
Purging configuration files for libglib2.0-0:i386 (2.48.2-0ubuntu1) ...
Removing libgssapi-krb5-2:i386 (1.13.2+dfsg-5ubuntu2) ...
Purging configuration files for libgssapi-krb5-2:i386 (1.13.2+dfsg-5ubuntu2) ...
Removing libice6:i386 (2:1.0.9-1) ...
Purging configuration files for libice6:i386 (2:1.0.9-1) ...
Removing libjbig0:i386 (2.1-3.1) ...
Purging configuration files for libjbig0:i386 (2.1-3.1) ...
Removing liblcms2-2:i386 (2.6-3ubuntu2) ...
Purging configuration files for liblcms2-2:i386 (2.6-3ubuntu2) ...
Removing libldap-2.4-2:i386 (2.4.42+dfsg-2ubuntu3.2) ...
Purging configuration files for libldap-2.4-2:i386 (2.4.42+dfsg-2ubuntu3.2) ...
Removing libmng2:i386 (2.0.2-0ubuntu3) ...
Purging configuration files for libmng2:i386 (2.0.2-0ubuntu3) ...
Removing libqtcore4:i386 (4:4.8.7+dfsg-5ubuntu2) ...
Purging configuration files for libqtcore4:i386 (4:4.8.7+dfsg-5ubuntu2) ...
Removing libsasl2-modules:i386 (2.1.26.dfsg1-14build1) ...
Purging configuration files for libsasl2-modules:i386 (2.1.26.dfsg1-14build1) ...
Removing libsm6:i386 (2:1.2.2-1) ...
Purging configuration files for libsm6:i386 (2:1.2.2-1) ...
Removing libssl1.0.0:i386 (1.0.2g-1ubuntu4.8) ...
Purging configuration files for libssl1.0.0:i386 (1.0.2g-1ubuntu4.8) ...
Removing libx11-6:i386 (2:1.6.3-1ubuntu2) ...
Purging configuration files for libx11-6:i386 (2:1.6.3-1ubuntu2) ...
Removing libxau6:i386 (1:1.0.8-1) ...
Purging configuration files for libxau6:i386 (1:1.0.8-1) ...
Removing libxext6:i386 (2:1.3.3-1) ...
Purging configuration files for libxext6:i386 (2:1.3.3-1) ...
Removing libxrender1:i386 (1:0.9.9-0ubuntu1) ...
Purging configuration files for libxrender1:i386 (1:0.9.9-0ubuntu1) ...
Removing libxt6:i386 (1:1.1.5-0ubuntu1) ...
Purging configuration files for libxt6:i386 (1:1.1.5-0ubuntu1) ...
Processing triggers for libglib2.0-0:amd64 (2.48.2-0ubuntu1) ...
╭─vindsl@Boogaloo-5 ~ 
╰─➤ 

The first command gives you a chance to back out.

The second command does the same thing, but you better hold your shirts ... LoL!  :D

Anyway, you might want to give one or the other a try.

Title: Re: remove kernel headers?
Post by: VinDSL on January 27, 2018, 09:09:41 am
BTW, if you just want to get rid of residuals, after you've uninstalled a kernel and don't feel comfortable monkeying around in CLI ...

Open Synaptic => Click on "Status" category => Look for "Not Installed (residual config)"

If the cat exists, open it, right-click any item(s) and select "Mark for Complete Removal" => Apply

Title: Re: remove kernel headers?
Post by: DAMIEN1307 on January 27, 2018, 09:16:50 am
i know i pride myself on keeping a clean system although i may just be going the long way around the barn to do so but here is what i got when i ran in cli...by the way PCnet...real comfortable with the terminal...the terminal is my friend lol...VinDSL...tell me about these results especially the second one...as far as i can see, im better off than i thought i was...i still think i must be missing something here though just dont know what...DAMIEN

damien@damien ~ $ dpkg -l | grep '^rc' | awk '{print $2}' | xargs sudo apt-get purge
[sudo] password for damien:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
damien@damien ~ $ sudo apt autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
damien@damien ~ $ dpkg -l | grep '^rc' | awk '{print $2}' | sudo xargs dpkg --purge
dpkg: error: --purge needs at least one package name argument

Type dpkg --help for help about installing and deinstalling packages
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked
damien@damien ~ $
Title: Re: remove kernel headers?
Post by: VinDSL on January 27, 2018, 09:36:41 am
Heh! Yeah, piped commands don't care about your feelings, or leaving you scratching your head. It's a form of passive aggression in cyberworld - them against us. And, they'll bite you in the butt, if you disrespect them.

Anyway, looks clean, to me.

Did you try the Synaptic drill?  I find kernel poo hidden in there, all the time ...

Title: Re: remove kernel headers?
Post by: DAMIEN1307 on January 27, 2018, 09:51:18 am
i havent as of yet cause i wanted to be sure that this went well first and seems it did...ill go for it now and will let ya know what i find...never did this one before so "FUNTIME" lol...DAMIEN
Title: Re: remove kernel headers?
Post by: DAMIEN1307 on January 27, 2018, 10:00:55 am
OK...just went through synaptic...clean as a whistle...no doggy doo to pooper scoop, no kitty litter to fritter with...thanks guys...i guess things were a little cleaner than i thought...anything else i could possibly look for that you can think of?...DAMIEN

PS...i know what the word karma means but what is the meaning behind "Karma: 7" listed after the number of posts ive made thus far?
Title: Re: remove kernel headers?
Post by: scifidude79 on January 27, 2018, 10:34:47 am
The karma system is a way of showing appreciation.  For example, if you help someone or they like what you had to say on a topic, they probably gave you a positive vote using the applaud/smite things.  Of course, it can go the other way too. ;)
Title: Re: remove kernel headers?
Post by: DAMIEN1307 on January 27, 2018, 10:50:42 am
hi scifi...thanx for the heads up on that...i guess i must of done somthing right then...(dont tell my ex-wife...she would never believe it)...lol...DAMIEN

ok scifi...your now up to 696...PCNetSpec is now up to 2176 and the drum roll for VinDSL who has now made it ...666...the big one, the triple sixer...lol
Title: Re: remove kernel headers?
Post by: VinDSL on January 27, 2018, 10:55:03 am
OK...just went through synaptic...clean as a whistle...no doggy doo to pooper scoop, no kitty litter to fritter with...thanks

Do these results (https://goo.gl/ahYx1e) look the same now?

Are the rc's still there?
Title: Re: remove kernel headers?
Post by: VinDSL on January 27, 2018, 10:58:40 am
OMG! My karma is '666'  :o

I'm going back to bed and pulling the covers over my head ...
Title: Re: remove kernel headers?
Post by: DAMIEN1307 on January 27, 2018, 11:05:52 am
this is what i just got in terminal the 4.10 doesnt answer...rc?...release candidates?...DAMIEN

damien@damien ~ $ dpkg -l | grep 4.8.0
ii  guvcview                                    2.0.5+ubuntu2~ppa1+1418-0ubuntu1~201702081552~ubuntu16.04.1 amd64        Gtk3 base UVC Viewer
ii  libguvcview-2.0-0:amd64                     2.0.5+ubuntu2~ppa1+1418-0ubuntu1~201702081552~ubuntu16.04.1 amd64        GUVCView - runtime


damien@damien ~ $ dpkg -l | grep 4.10.0


damien@damien ~ $ dpkg -l | grep 4.11.0
ii  gir1.2-javascriptcoregtk-3.0:amd64          2.4.11-0ubuntu0.1                                           amd64        JavaScript engine library from WebKitGTK+ - GObject introspection data
ii  gir1.2-webkit-3.0:amd64                     2.4.11-0ubuntu0.1                                           amd64        Web content engine library for GTK+ - GObject introspection data
ii  libjavascriptcoregtk-1.0-0:amd64            2.4.11-0ubuntu0.1                                           amd64        JavaScript engine library from WebKitGTK+
ii  libjavascriptcoregtk-3.0-0:amd64            2.4.11-0ubuntu0.1                                           amd64        JavaScript engine library from WebKitGTK+
ii  libwebkitgtk-1.0-0:amd64                    2.4.11-0ubuntu0.1                                           amd64        Web content engine library for GTK+
ii  libwebkitgtk-1.0-common                     2.4.11-0ubuntu0.1                                           all          Web content engine library for GTK+ - data files
ii  libwebkitgtk-3.0-0:amd64                    2.4.11-0ubuntu0.1                                           amd64        Web content engine library for GTK+
ii  libwebkitgtk-3.0-common                     2.4.11-0ubuntu0.1                                           all          Web content engine library for GTK+ - data files


damien@damien ~ $ dpkg -l | grep 4.13.0
ii  linux-generic-hwe-16.04                     4.13.0.32.52                                                amd64        Complete Generic Linux kernel and headers
ii  linux-headers-4.13.0-32                     4.13.0-32.35~16.04.1                                        all          Header files related to Linux kernel version 4.13.0
ii  linux-headers-4.13.0-32-generic             4.13.0-32.35~16.04.1                                        amd64        Linux kernel headers for version 4.13.0 on 64 bit x86 SMP
ii  linux-headers-generic-hwe-16.04             4.13.0.32.52                                                amd64        Generic Linux kernel headers
ii  linux-image-4.13.0-32-generic               4.13.0-32.35~16.04.1                                        amd64        Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii  linux-image-extra-4.13.0-32-generic         4.13.0-32.35~16.04.1                                        amd64        Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
ii  linux-image-generic-hwe-16.04               4.13.0.32.52                                                amd64        Generic Linux kernel image
damien@damien ~ $
Title: Re: remove kernel headers?
Post by: PCNetSpec on January 27, 2018, 11:26:24 am
Wanna know what the package status "ii" and "rc" stand for...

See the green ticked answer here:
https://askubuntu.com/questions/18804/what-do-the-various-dpkg-flags-like-ii-rc-mean

Quote
First letter -> desired package state ("selection state"):

    u ... unknown
    i ... install
    r ... remove/deinstall
    p ... purge (remove including config files)
    h ... hold

Second letter -> current package state:

    n ... not-installed
    i ... installed
    c ... config-files (only the config files are installed)
    U ... unpacked
    F ... half-configured (configuration failed for some reason)
    h ... half-installed (installation failed for some reason)
    W ... triggers-awaited (package is waiting for a trigger from another package)
    t ... triggers-pending (package has been triggered)

Third letter -> error state (you normally shouldn't see a third letter, but a space, instead):

    R ... reinst-required (package broken, reinstallation required)
Title: Re: remove kernel headers?
Post by: DAMIEN1307 on January 27, 2018, 11:37:04 am
OK...i cant just say thats all greek to me since i can read and speak some greek, so ill have to say, thank you for introducing me to ancient sanskrit, im now sucking my thumb in wonder and really dont have a clue of understanding what i just saw...lol...could you just let me know if what i posted as the "after" readings are in line of what you and vin were hoping to see or is anything out of line there?...lol...DAMIEN

ok i think i just had "light dawn upon marble head"...the first i = desired state...the second i = current state...the only thing left to understand then if ive got this right is why did the 4.10 series come back with nada?

just gor that one as well r = remove which is the desired state...c = only the config files are installed...i think i got it...this is what happens when you get old and just dont sleep at night like last night was for me...dont worry you'll get there to...you may not be "over the hill yet" but im sure you can certainly see the top...lo...lthen like me,  you too can slide down the razor blade of life...lol

i think in my case, Ian Anderson of jethro tull said it best...how does it feeeel, to be thick as a brick...many thanks to all of you guys for help in this matter...i got one more for ya though...on the whisker menu on the top left side there is a human figure with my name next to it...is there a way to change that avatar into my coat of arms like what i have on this post? just asking...DAMIEN
Title: Re: remove kernel headers?
Post by: PCNetSpec on January 27, 2018, 11:55:53 am
ii = the package was meant to be installed, and it currently is installed .. there is no third letter, so no error.

rc = the package is meant to be removed, but currently the config files are still present (ie. it was 'removed' not 'purged') .. there is no third letter, so no error.



If you saw say 'ihR'...

ihR = The package is meant to be installed, but currently it is only half-installed (ie. the installation failed for some reason), so the error is telling you it needs to be Reinstalled.

I guess you can extrapolate the rest.
Title: Re: remove kernel headers?
Post by: VinDSL on January 27, 2018, 11:58:08 am
OK...i cant just say thats all greek to me since i can read and speak some greek, so ill have to say, thank you for introducing me to ancient sanskrit [...]

Yup. There are three fields: Removed, Status, and Error

"rc" in this case means the kernel package was removed, but the configs hung around.

Looks like they're gone now. You should be good until the next time ...

Title: Re: remove kernel headers?
Post by: VinDSL on January 27, 2018, 12:10:28 pm
rc = the package is meant to be removed, but currently the config files are still present (ie. it was 'removed' not 'purged')


I have a *feeling* this is happening when users remove kernel packages via 'Update Manager'.

Not sure if it's intentional or a bug - I suspect intentional ...
Title: Re: remove kernel headers?
Post by: PCNetSpec on January 27, 2018, 12:11:23 pm
It's intentional .. configs NEVER get removed unless the user specifically chooses '--purge' .. they're NEVER removed automatically.
Title: Re: remove kernel headers?
Post by: VinDSL on January 27, 2018, 12:12:22 pm
Cool !  :)
Title: Re: remove kernel headers?
Post by: VinDSL on January 27, 2018, 12:14:15 pm
Er...

I was dancing on the keyboard are accidentally erased your message.  :-[

Can you get rid of that '666' please?
Title: Re: remove kernel headers?
Post by: DAMIEN1307 on January 27, 2018, 12:27:01 pm
hey vin...i got rid of the tripple ripple for ya...always remember that it was a real honest to goodness church going, bible thumping, Christian that gave ya the triple sixes...lol...DAMIEN
Title: Re: remove kernel headers?
Post by: VinDSL on January 27, 2018, 12:40:06 pm
THX!

Stuff like that really freaks me out. No kidding  8)
Title: Re: remove kernel headers?
Post by: PCNetSpec on January 27, 2018, 12:44:41 pm
"-rw-rw-rw-" is part of the little message under my avatar on the left :)