LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 11-15-2018, 06:55 PM   #1
sibelius
Member
 
Registered: Oct 2018
Location: Leura NSW Australia
Distribution: Linux Knoppix 8.1
Posts: 53

Rep: Reputation: 0
problems with old kernel to be removed


Good morning everybody.
I tried to remove old kernel because seems they give me problems when I try to install some programs.
at the moment I use the first of the following list.

ii linux-image-4.12.7 4.12.7-10.00.Custom i386 Linux kernel binary image for version 4.12.7

ii linux-image-4.12.7-64 4.12.7-64-10.00.Custom i386 Linux kernel binary image for version 4.12.7-64

pH linux-image-4.9.0-040900-generic 4.9.0-040900.201612111631 i386 Linux kernel image for version 4.9.0 on 32 bit x86 SMP

pH linux-image-4.9.0-8-rt-686-pae 4.9.130-2 i386 Linux 4.9 for modern PCs, PREEMPT_RT

pH linux-image-4.9.11 1.0.NAS i386 Linux kernel binary image for version 4.9.11


I d like to get rid off all the other but when I give in order the follows commands

sudo apt-get --purge remove (list of what i want to remove)

I get the following message

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-4.12.7-64 linux-image-4.9.0-040900-generic
linux-image-4.9.0-8-rt-686-pae linux-image-4.9.11
0 upgraded, 0 newly installed, 4 to remove and 952 not upgraded.
4 not fully installed or removed.
After this operation, 609 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 494691 files and directories currently installed.)
Removing linux-image-4.12.7-64 (4.12.7-64-10.00.Custom) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.12.7-64 /boot/vmlinuz-4.12.7-64
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.12.7-64 /boot/vmlinuz-4.12.7-64
Searching for GRUB installation directory ... found: /boot/grub
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.12.7-64.postrm line 291.
dpkg: error processing package linux-image-4.12.7-64 (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.9.0-040900-generic (4.9.0-040900.201612111631) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.9.0-040900-generic /boot/vmlinuz-4.9.0-040900-generic
update-initramfs: Deleting /boot/initrd.img-4.9.0-040900-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.9.0-040900-generic /boot/vmlinuz-4.9.0-040900-generic
Searching for GRUB installation directory ... found: /boot/grub
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.9.0-040900-generic.postrm line 328.
dpkg: error processing package linux-image-4.9.0-040900-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.9.0-8-rt-686-pae (4.9.130-2) ...
I: /boot/vmlinuz is now a symlink to vmlinuz-4.12.7
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.9.0-8-rt-686-pae
/etc/kernel/postrm.d/zz-update-grub:
Searching for GRUB installation directory ... found: /boot/grub
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-4.9.0-8-rt-686-pae (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.9.11 (1.0.NAS) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.9.11 /boot/vmlinuz-4.9.11
update-initramfs: Deleting /boot/initrd.img-4.9.11
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.9.11 /boot/vmlinuz-4.9.11
Searching for GRUB installation directory ... found: /boot/grub
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.9.11.postrm line 291.
dpkg: error processing package linux-image-4.9.11 (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-4.12.7-64
linux-image-4.9.0-040900-generic
linux-image-4.9.0-8-rt-686-pae
linux-image-4.9.11
E: Sub-process /usr/bin/dpkg returned an error code (1)



any help would be great
thank you
 
Old 11-16-2018, 07:19 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,140

Rep: Reputation: 2307Reputation: 2307Reputation: 2307Reputation: 2307Reputation: 2307Reputation: 2307Reputation: 2307Reputation: 2307Reputation: 2307Reputation: 2307Reputation: 2307
I would see what's there. Have a look (e.g. ls -lh) for kernels, initrds, configs & System.maps in /boot. Note but ignore symlinks
Have a look (e.g. ls -lh) for module trees in /lib/modules.

Presuming they're still there, remove your unwanted ones from your grub configuration. Then try again.
 
Old 11-16-2018, 08:15 AM   #3
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Please paste the output from the following commands (without the row of equals signs for the latter command):

Code:
uname -a

dpkg -l | grep -v "^ii"
 
Old 11-16-2018, 04:50 PM   #4
sibelius
Member
 
Registered: Oct 2018
Location: Leura NSW Australia
Distribution: Linux Knoppix 8.1
Posts: 53

Original Poster
Rep: Reputation: 0
thank you very much for the answers,I solve the problems in a easy way, I reinstall knoppix again, I made a bit of a mess trying to install same strange workbench for freecad and the whole system went mad, so then I find out that I had several kernels built in and I was thinking were in conflict, so that's the decision to eliminate some of them.
Anyway everything seems fine now.
thank you again.
 
Old 11-17-2018, 06:56 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,140

Rep: Reputation: 2307Reputation: 2307Reputation: 2307Reputation: 2307Reputation: 2307Reputation: 2307Reputation: 2307Reputation: 2307Reputation: 2307Reputation: 2307Reputation: 2307
FYI, kernels are one of the few things you can remove without too much discomfort, as nothing is goiing to get broken if you remove kernels, initrds, modules, & sources. Kernel headers are a different matter - let's leave it at that.
 
Old 11-18-2018, 05:43 AM   #6
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,824
Blog Entries: 17

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
Quote:
Originally Posted by business_kid View Post
FYI, kernels are one of the few things you can remove without too much discomfort, as nothing is goiing to get broken if you remove kernels, initrds, modules, & sources. Kernel headers are a different matter - let's leave it at that.
Except Grub might complain and crash at startup if you have configurations in there of Kernels that do not exist (have been removed). Yes, it's true. I have experienced this myself.. Typically I just expected those boot options not to work, not to crash Grub.

So, to be on the safe side, also reconfigure your boot loader when you remove unused kernels.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Eric removed Palemon from his smithy - palemoon: removed from the repository becasuse [sic] of developer attitude Darth Vader Slackware 14 09-02-2018 01:30 PM
When 1 app is removed, is it removed from the other accounts too? drpeppercan Linux Mint 12 12-24-2017 07:42 AM
Removed accidently removed panel at Suse 11.1? alte_mann SUSE / openSUSE 6 01-29-2009 04:19 AM
big plans for old old old laptop vdogvictor Linux - Laptop and Netbook 0 05-26-2004 07:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 07:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration