apt-get misreads specified kernel to delete

Bug #410666 reported by myrtille
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hi,

I'm currently running kubuntu jaunty with the 2.6.30 kernel and kde 4.2.4, apt is version 0.7.20.2ubuntu6.

I decided to remove kernel version 2.6.28-11 and ran "sudo apt-get remove -purge 2.6.28-11*" expecting the command would remove the 2.6.28-11 kernel. However it tried to remove ALL installed kernels from the 2.6.28-group (so in my case 2.6.28.11,2.6.28.13 and 2.6.28.14). I attached the output of "sudo apt-get remove -purge 2.6.28-11*".

I removed the 2.6.28-11 kernel version successfully by using the following command: apt-get remove 2.6.28-11-*, however I think that the command I initially used should not delete all kernels as this is an accident waiting to happen.

I also tried to replicate this behaviour with other packages, but it worked fine for "sudo apt-get remove -purge flashplugin-nonfree*" it only listed packages containing "flashplugin-nonfree" and no packages containing "flashplugin" but not "nonfree", so it's probably a problem that is specific to the kernel packages.

Revision history for this message
myrtille (akm1984) wrote :
Revision history for this message
myrtille (akm1984) wrote :

The same is true for apt-cache.

apt-cache search 2.6.28-11* will list all kernels from 2.6.28.*

Revision history for this message
myrtille (akm1984) wrote :

Still true as of now

Revision history for this message
Torsten Spindler (tspindler) wrote :

Also valid in Ubuntu 10.10.

Changed in apt (Ubuntu):
status: New → Confirmed
Revision history for this message
David Kalnischkies (donkult) wrote :

The pattern you can specify here is a full-blown regex (=regular expression) one and NOT a wildcard style one you know maybe from e.g. bash.

Thats a feature, not a bug and completely expected.

$ apt-get remove gnome*
will not only remove gnome and gnome-desktop but also libgnome0 (note that it doesn't start with gnome) and gomint (note the "missing" e)

So myrtille should have written
$apt-get purge 2\.6\.28-11.*

(note the dot-escaping, otherwise 226A28-11 would be a match too…)

Changed in apt (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.