2 Answers
2

In a regular expression, . mean any character, and * means zero or more times. So the expression libreoffice.* matches any package name containing the string libreoffice, followed by any number of characters.

Surround the regular expression with single quotes to avoid the shell interpreting the asterisk. (If you had a file named libreoffice.example for example in your current directory, the shell would replace libreoffice.* with libreoffice.example, so you have to use single quotes to stop this behaviour.)

Thanks, this works. Interestingly enough, it also works with the pattern libreoffice* (i.e. glob style patterns) which confuses me a bit because either of them shouldn't work :-)
–
Aaron DigullaApr 4 '13 at 12:09

2

For those who want to test this, use the option --dry-run to see what would be deleted without any changes to the system.
–
Aaron DigullaApr 4 '13 at 12:11