how to install a pattern with exclusion

Asked by Jerome Yanga

Hi! I am trying to install all fonts packages except fonts-mathematica. What is the best way to go about this?

I started with the command below.

apt-get -y install *fonts*

Regards,
j

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#1

apt-cache search font- | awk {'print $1'} | grep -v fonts-mathematical >> /tmp/packages.txt && gedit /tmp/packages.txt

You can now review the packages. If you are happy with the list then run:

sudo apt install `cat /tmp/packages.txt`

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

Sorry, switch font- for fonts-

Typo

Revision history for this message
Jerome Yanga (jgyanga) said :
#3

Thanks actionparsnip, that solved my question.