$ sudo aptitude purge linux-image-2.6.15-1-k7
Reading package lists... Done
Building dependency tree... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
Building tag database... Done
The following packages will be REMOVED:
linux-image-2.6.15-1-k7{p}
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Do you want to continue? [Y/n/?]
Writing extended state information... Done
(Reading database ... 166723 files and directories currently installed.)
Removing linux-image-2.6.15-1-k7 ...
Purging configuration files for linux-image-2.6.15-1-k7 ...
Running postrm hook /sbin/update-grub .
Searching for GRUB installation directory ... found: /boot/grub
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... found: (hd0,0)/boot/grub/splashimages/debsplash.xpm.gz
Found kernel: /boot/vmlinuz-2.6.18-3-k7
Found kernel: /boot/vmlinuz-2.6.17-2-k7
Found kernel: /boot/memtest86.bin
Updating /boot/grub/menu.lst ... done
dpkg: error processing linux-image-2.6.15-1-k7 (--purge):
subprocess post-removal script returned error exit status 128
Errors were encountered while processing:
linux-image-2.6.15-1-k7
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover: