8

As the solution to another problem I was forced to use dpkg --remove to uninstall a package. However, after I do this the package is still listed in dpkg -l:

phrogz@planar:/boot$ dpkg -l | grep linux-image-2
ii  linux-image-2.6.32-30-server  2.6.32-30.59  Linux kernel image for version 2.6.32 on x86
ii  linux-image-2.6.32-31-server  2.6.32-31.61  Linux kernel image for version 2.6.32 on x86
ii  linux-image-2.6.32-32-server  2.6.32-32.62  Linux kernel image for version 2.6.32 on x86

phrogz@planar:/boot$ sudo dpkg --remove linux-image-2.6.32-30-server
(Reading database ... 141902 files and directories currently installed.)
Removing linux-image-2.6.32-30-server ...
Running postrm hook script /usr/sbin/update-grub.
Generating grub.cfg ...
[...]
done

phrogz@planar:/boot$ dpkg -l | grep linux-image-2
rc  linux-image-2.6.32-30-server  2.6.32-30.59  Linux kernel image for version 2.6.32 on x86
ii  linux-image-2.6.32-31-server  2.6.32-31.61  Linux kernel image for version 2.6.32 on x86
ii  linux-image-2.6.32-32-server  2.6.32-32.62  Linux kernel image for version 2.6.32 on x86

phrogz@planar:/boot$ sudo apt-get --purge remove linux-image-2.6.32-30-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package linux-image-2.6.32-30-server is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

How can I 'clean house' so that dpkg-l no longer lists these older, non-existent packages?

einpoklum
  • 871
  • 3
  • 10
  • 28
Phrogz
  • 1,646

1 Answers1

9

Run

sudo dpkg --purge <package>

or

sudo apt-get purge <package>

to uninstall <package> AND its configuration files.

htorque
  • 64,798