I've come across an issue that appears to relate directly to this discussion. I'd like to call it a bug, but it appears the maintainer(s) [or lack thereof] here may not agree.
> > Maybe it is also because i regularly "remove" packages which are not > > installed in an install command as apt-get can be hinted this way > > that i don't want this package installed as a dependency of whatever > > i have requested. The inverse is also true if e.g. removing a bunch > > of packages by regex and just want to keep a few. (Not sure how many > > "normal" users know/use that through.) > > I'd assume the number of users that use apt-get in this way is > rather low ;) Count me as one of those users! I often want to install packages with many dependencies, and have most of the Recommends: go in as well (so --no-install-recommends is not appropriate), but still exclude a small number of unwanted packages. The syntax David alludes to, which appends a hyphen to the package name specified to "apt-get", is perfect for this. Recently, I was working in Ubuntu Xenial (apt version 1.2.10ubuntu1), and observed this behavior: # apt-get -s install xubuntu-desktop bluez- | grep bluez Package 'bluez' is not installed, so not removed avahi-autoipd avahi-daemon avahi-utils bc blueman bluez:i386 bluez-cups bluez-obexd brltty brltty-x11 catfish cheese-common colord colord-data I don't want "bluez" to be pulled in along with "xubuntu-desktop", so I specify it with the trailing hyphen. But apt-get then says "okay, that's fine, I'll install 'bluez:i386' instead." So I have to specify "bluez:*-" in order to set it straight and get the desired effect. This does not appear to be a desirable behavior, and I don't think it is particularly defensible, either. As it is, most packages can be not- installed with just the hyphen. It is only certain packages that, thanks to dependency vagaries, can slip in via a foreign architecture and thus need the wildcard. (Two more such packages are "libbonobo2-common" and "pulseaudio".) I'd like to see "foo-" effectively mean the same thing as "foo:*-". (Which seems to be basically what Carsten was requesting, albeit in a somewhat different context.)