Debian – How to select packages start with “mate-” but not end with “-dev”

aptdebian

I want to install all MATE packages,

$ sudo apt-get install '^mate'

However, it selects too many packages, and some packages are conflicted with some installed ones.

Now, I want to exclude them. Any idea?

No surprise, this won't work:

$ sudo apt-get install '^mate && !-dev'

Or, can I simply let apt-get ignore those conflicted packages?

Best Answer

You could try something like:

list="" ; for pkg in $(apt-cache search ^mate | grep -v -- '-dev'); list="$list $pkg" ; done ; sudo apt-get install $list
Related Question