
Therefore, you should escape the wildcard (and one way to do that is with a \ character before the *). However, the shell itself, which executes apt-get with the command-line arguments you specify, also accepts wildcards. It can stay, and it will catch the various related packages as described above, as well as packages with explicit versions in their names as discussed there.

(Be careful with this as applied to packages with shorter names! For example, wine\* matches every package with win-not just win e-anywhere in its name.) When used in an apt-get command, virtualbox-\* (see below for why the \, which is not being used as regular expression syntax) actually matches any package whose name contains virtualbox. This is in some ways similar to the way a command-line shell processes *. Some are probably already not installed, and some may be removed automatically as a consequence of removing others, but some would not.Īpt-get accepts * characters and treats them as part of a regular expression. Virtualbox-guest-dkms virtualbox-ose-guest-x11 Virtualbox-guest-additions-iso virtualbox-ose-guest-utils Virtualbox-guest-additions virtualbox-ose-guest-dkms For example, on the 11.10 box I'm using right now, there are 18 such packages available for installation (your machine might have some or even all of them, or other packages from your release or a PPA): virtualbox virtualbox-ose Assuming your machine no longer needs to be a VirtualBox host or guest machine, all these packages can go. You may have multiple VirtualBox-related packages installed.

That method is OK, but this way may be more thorough. If you want to remove global configuration files too (this does not remove your virtual machines), run exactly this instead: sudo apt-get purge virtualbox-\* To remove VirtualBox, I actually recommend running this command and not replacing * with anything (just run it exactly like so): sudo apt-get remove virtualbox-\*
