# portmaster -a with exclude few packages



## bryn1u (Sep 1, 2017)

Hello guys,

I have a few packages which can't be installed via ports. Im looking for some solutions to exclude those packages during ports upgrade with portmaster -a. Someone has done it before ?

I would be grateful. Thanks.


----------



## Minbari (Sep 1, 2017)

*pkg* *lock*


----------



## bryn1u (Sep 1, 2017)

Yes i know but then i can't update packages installed with pkg. I mean something like lock for portmaster. Or something like equivalent of RedHat yum update --exclude package but for portmaster


----------



## cpm@ (Sep 1, 2017)

bryn1u said:


> Yes i know but then i can't update packages installed with pkg. I mean something like lock for portmaster. Or something like equivalent of RedHat yum update --exclude package but for portmaster



To update all ports except editors/libreoffice with portmaster(8):

`portmaster -a -x libreoffice`

 Note that the *-x*  flag can be specified more than once.


----------



## Minbari (Sep 1, 2017)

It doesn't matter if you use portmaster or pkg to upgrade your software, there is no difference between a port and package once they're installed.



> The *portmaster* utility is a tool for updating your ports. It does *not use an external database* to track what you have installed. Rather it uses the *existing ports infrastructure*, including what is located in_ /var/db/pkg_.


----------



## bryn1u (Sep 1, 2017)

Thanks guys


----------



## SirDice (Sep 6, 2017)

bryn1u said:


> I have a few packages which can't be installed via ports. Im looking for some solutions to exclude those packages during ports upgrade with portmaster -a.


You could find out why and fix the actual cause, instead of trying to work around the bad symptoms.


----------

