Problems Purging Old Kernel Packages.. Needs Help!

Leonard lenc5570 at sbcglobal.net
Thu Nov 26 05:10:01 UTC 2009


Aaron Lewis wrote:
> Hi,
>    I'm new to ubuntu,before that i use slackware.
>
> root# apt-get install -y linux-source
>   Then I tried to compile a new kernel with make-kpkg.
>    Successfully installed new kernel with dpkg.
>
> root# dpkg -i ../*deb
>
> Now I removed it for updates:
> root# apt-get remove linux-image-...
>
> It's really bad .. i forgot to use --purge to get rid of all things.
>
> When i install bootchart, i found the problem.
> root# apt-get install bootchart
> --snip--
> update-initramfs: Generating /boot/initrd.img-2.6.31.4core2
> Cannot find /lib/modules/2.6.31.4core2
> update-initramfs: failed for /boot/initrd.img-2.6.31.4core2
> update-initramfs: Generating /boot/initrd.img-2.6.31.4-core2
> Cannot find /lib/modules/2.6.31.4-core2
> update-initramfs: failed for /boot/initrd.img-2.6.31.4-core2
> update-initramfs: Generating /boot/initrd.img-2.6.31-15-386
> --snip--
>
> Anyway to purge it? ( Sorry i deleted my own deb packages.)
>
> A dirty hack:
> root# mkdir /lib/modules/2.6.31.4core2
>
>    
Just run the same command again from the cli but substitute purge for 
the original remove command
and it should purge the rest incluging the module packages.  I'm not 
totally sure what all you did or
the exact issues you or having(can you boot).  Surely you left at least 
one other kernel besides the one
you compiled.  But if you can boot up to a tty termican or in recovery 
mode you can reinstall anything
you removed.  Things to try from cli in case you have broken packages are:
Note: you are advised to use sudo instead of a root cli.
sudo aptitude update && sudo aptitude safe-upgrade
sudo aptitude -f install
sudo dpkg --configure -a
If you get any error output then repeat the cli commands until there are 
no more errors reported the repeat again one or more times.
HTH
Just in case the purge command doesn't work correctly and gives errors 
try reinstalling the program(kernel) and then purge again.

-- 
Leonard
enc5570 at sbcglobal.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lenc5570.vcf
Type: text/x-vcard
Size: 115 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20091125/074943ae/attachment.vcf>


More information about the ubuntu-users mailing list