Can't remove linux-image-2.6.39-2-486

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
fletertj

Can't remove linux-image-2.6.39-2-486

Post by fletertj »

Hi
Should have left well enough alone but tried to clean up grub menu and remove above package thru synaptic.
I'm running fine on
thos@m1530mdx:~$ uname -a
Linux m1530mdx 3.0.0-1-486 #1 Sun Jul 24 13:43:13 UTC 2011 i686 GNU/Linux

error message in terminal is:

Code: Select all

(Reading database ... 143405 files and directories currently installed.)
Removing linux-image-2.6.39-2-486 ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 2.6.39-2-486 /boot/vmlinuz-2.6.39-2-486
update-initramfs: Deleting /boot/initrd.img-2.6.39-2-486
run-parts: executing /etc/kernel/postrm.d/zz-extlinux 2.6.39-2-486 /boot/vmlinuz-2.6.39-2-486
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.0.0-1-486...
E: /usr/share/syslinux/debian/extlinux: No such file or directory
run-parts: /etc/kernel/postrm.d/zz-extlinux exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-2.6.39-2-486.postrm line 235.
dpkg: error processing linux-image-2.6.39-2-486 (--remove):
 subprocess installed post-removal script returned error exit status 1
configured to not write apport reports
                                      Errors were encountered while processing:
 linux-image-2.6.39-2-486
E: Sub-process /usr/bin/dpkg returned an error code (1)
I've tried all the apt-get check, clean, autoclean, autoremove etc.
Any ideas would be appreciated
Thanks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Beardedragon

Re: Can't remove linux-image-2.6.39-2-486

Post by Beardedragon »

Make sure you are NOT in the kernel you are trying to remove, then, use Synaptic to find and remove the Image and the headers.
mads

Re: Can't remove linux-image-2.6.39-2-486

Post by mads »

Hi. It seems that the error is related to extlinux. It is not installed in main edition, but I don't know about xfce.
Try one of these.
sudo apt-get install --reinstall extlinux
sudo apt-get purge extlinux (if you are sure you don't need it)
mikhou

Re: Can't remove linux-image-2.6.39-2-486

Post by mikhou »

I know that it sounds simple, but like beardeddragon said you're not booted up with that kernel are you? Make sure that you have booted into a different kernel before trying to remove this one.

mikhou
fletertj

Re: Can't remove linux-image-2.6.39-2-486

Post by fletertj »

Thanks for the replies,

does this mean that I'm currently loaded with 3.xxxx?

thos@m1530mdx:~$ uname -a
Linux m1530mdx 3.0.0-1-486 #1 Sun Jul 24 13:43:13 UTC 2011 i686 GNU/Linux

Tom
Beardedragon

Re: Can't remove linux-image-2.6.39-2-486

Post by Beardedragon »

fletertj wrote:Thanks for the replies,

does this mean that I'm currently loaded with 3.xxxx?

thos@m1530mdx:~$ uname -a
Linux m1530mdx 3.0.0-1-486 #1 Sun Jul 24 13:43:13 UTC 2011 i686 GNU/Linux

Tom
Yes, that is correct.
BrunoMiranda
Level 4
Level 4
Posts: 361
Joined: Thu Jun 24, 2010 2:22 pm

Re: Can't remove linux-image-2.6.39-2-486

Post by BrunoMiranda »

Hi guys,
I've been trying to download and install other kernels, and i'm having about the same thing on 2 computers, one with Mint 11 main edition running MATE and the other one with Mint 12 LXDE (+ MATE installed).

So here it goes... (just for the computer with Mint 12 LXDE + MATE installed)


I can't uninstall linux-image-3.3.0-rt.vhacker-davalan-celeron

I'm not booting 3.3 that i want to remove, but 3.2:

uname -a
Linux Cagalhaes 3.2.0-2-486 #1 Mon Mar 5 00:55:40 UTC 2012 i686 i686 i386 GNU/Linux


I've done everything as root... :mrgreen:


If i try to purge it:
apt purge linux-image-3.3.0-rt.vhacker-davalan-celeron
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-3.3.0-rt.vhacker-davalan-celeron
0 upgraded, 0 newly installed, 1 to remove and 19 not upgraded.
2 not fully installed or removed.
After this operation, 105 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 149903 files and directories currently installed.)
Removing linux-image-3.3.0-rt.vhacker-davalan-celeron ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.3.0-rt.vhacker-davalan-celeron /boot/vmlinuz-3.3.0-rt.vhacker-davalan-celeron
update-initramfs: Deleting /boot/initrd.img-3.3.0-rt.vhacker-davalan-celeron
run-parts: executing /etc/kernel/postrm.d/zz-extlinux 3.3.0-rt.vhacker-davalan-celeron /boot/vmlinuz-3.3.0-rt.vhacker-davalan-celeron
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.2.0-2-486...
P: Writing config for Windows XP on /dev/sda1...
E: /usr/share/syslinux/debian/extlinux: No such file or directory
run-parts: /etc/kernel/postrm.d/zz-extlinux exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.3.0-rt.vhacker-davalan-celeron.postrm line 271.
dpkg: error processing linux-image-3.3.0-rt.vhacker-davalan-celeron (--remove):
subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-image-3.3.0-rt.vhacker-davalan-celeron
E: Sub-process /usr/bin/dpkg returned an error code (1)


If i try to reinstall extlinux:
apt reinstall extlinux
The following packages will be REINSTALLED:
extlinux
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 19 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
E: I wasn't able to locate a file for the linux-image-3.3.0-rt.vhacker-davalan-celeron package. This might mean you need to manually fix this package.
E: I wasn't able to locate a file for the linux-image-3.3.0-rt.vhacker-davalan-celeron package. This might mean you need to manually fix this package.
E: Internal error: couldn't generate list of packages to download



I've downloaded extlinux manually and when i try to install it using the -deb installer i get:
Unpacking replacement extlinux ...
Setting up extlinux (2:4.04+dfsg-1ubuntu1) ...
P:Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.2.0-2-486...
P: Writing config for Windows XP on /dev/sda1...
E: /usr/share/syslinux/debian/extlinux: no such file or directory
pdkg: error processing extlinux (--install):
subprocess installed post-instalation script returned error exit status 1
Processing triggers dor man-db ...
Errors were encontered while processing:
extlinux


I've googled around and found out

http://ubuntugenius.wordpress.com/2011/ ... d-modules/


They recommend running

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

Got this output:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-headers-3.2.0-2-486* linux-headers-3.2.0-2-common* linux-image-3.3.0-rt.vhacker-davalan-celeron linux-kbuild-3.2*
0 upgraded, 0 newly installed, 4 to remove and 19 not upgraded.
2 not fully installed or removed.
After this operation, 132 MB disk space will be freed.
(Reading database ... 149903 files and directories currently installed.)
Removing linux-image-3.3.0-rt.vhacker-davalan-celeron ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.3.0-rt.vhacker-davalan-celeron /boot/vmlinuz-3.3.0-rt.vhacker-davalan-celeron
update-initramfs: Deleting /boot/initrd.img-3.3.0-rt.vhacker-davalan-celeron
run-parts: executing /etc/kernel/postrm.d/zz-extlinux 3.3.0-rt.vhacker-davalan-celeron /boot/vmlinuz-3.3.0-rt.vhacker-davalan-celeron
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.2.0-2-486...
P: Writing config for Windows XP on /dev/sda1...
E: /usr/share/syslinux/debian/extlinux: No such file or directory
run-parts: /etc/kernel/postrm.d/zz-extlinux exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.3.0-rt.vhacker-davalan-celeron.postrm line 271.
dpkg: error processing linux-image-3.3.0-rt.vhacker-davalan-celeron (--remove):
subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-image-3.3.0-rt.vhacker-davalan-celeron
E: Sub-process /usr/bin/dpkg returned an error code (1)


And that's the end of my line...
I've noticed this is the Xfce forum and i'm using other versions, but apart of this... I'm clueless! :?:


Does anyone have any idea?
Thanks!
Bye for now,
Bruno


(Always backup before you screw up :)
BrunoMiranda
Level 4
Level 4
Posts: 361
Joined: Thu Jun 24, 2010 2:22 pm

Re: Can't remove linux-image-2.6.39-2-486

Post by BrunoMiranda »

Flatertj, I've solved this on my PC:
The package itself was uninstalled, but has left behind some minor traces of files and scripts that were messing around with apt and dpkg.

What i have done was searching for files, in my case i have searched for 3.3.0 and have deleted them all as root.
Then when i ran Synaptic, it has given some errors, but then it has cleared itself and is now working fine again.


Too many years on desperately force deleting stuff that didn't want to uninstall on Windows has actually helped on something, after all... :lol:



Suggestions: :wink:
- Use a console as root
- Use updatedb to update the file search's database
- Use locate 2.6.39-2-486 to find the files
- Everytime you delete files and want to locate more of them again, run updatedb again
- Once located, to browse and delete files more easily use your file manager GUI as root. For that, press Alt+F2 and execute gksudo nautilus. (If you have some other file manager, execute gksudo the-name-of-the-file-manager, like caja if you're running MATE, or pcmanfm or dolphin.)
- When no traces of files are found, run Synaptic and apply the changes it should propose automatically, or install/uninstall anything.


Try this and then report back. Good luck and don't break your system! :shock:

Anything at all, just ask!
Bye for now,
Bruno


(Always backup before you screw up :)
BrunoMiranda
Level 4
Level 4
Posts: 361
Joined: Thu Jun 24, 2010 2:22 pm

Re: Can't remove linux-image-2.6.39-2-486

Post by BrunoMiranda »

I was again dwelling with a similar problem, and it has solved itself just by purging and reinstalling extlinux.

sudo apt purge extlinux

sudo apt install extlinux
Bye for now,
Bruno


(Always backup before you screw up :)
Locked

Return to “Xfce”