apt-get
suporta expressões regulares. Basta incluir um .
, *
ou ?
no nome do pacote para torná-lo uma expressão:
apt-get remove 'xfce.'
Em man apt-get
:
If no package matches the given expression and the expression
contains one of '.', '?' or '*' then it is assumed to be a POSIX
regular expression, and it is applied to all package names in the
database. Any matches are then installed (or removed). Note that
matching is done by substring so 'lo.*' matches 'how-lo' and
'lowest'. If this is undesired, anchor the regular expression with
a '^' or '$' character, or create a more specific regular
expression.