# Portmaster -a and -af



## JazzSinatra (Jul 5, 2017)

Is it still bad practice to update installed ports with Portmaster -a or -af? In this Thread 15799 user "phoenix" says, that



> Never use the -a option together with -f, that's just asking for trouble. In fact, never use -a, period.
> 
> If you want brain-dead simple upgrades, then stick to binary packages.
> 
> ...



Is this information still valid? The FreeBSD handbook recommends just to use:

`portmaster -a`

and if that fails, then:
`portmaster -af`


----------



## ShelLuser (Jul 5, 2017)

There's nothing wrong with using `# portmaster -a`. All it does is go over the list of installed packages after which it'll build & (re)install the ones which have a new version. The poster has a point that using -af together can cause some side effects (force compilation of all upgradeable ports _and_ all their dependencies) but other than having to wait a (very?) long time for your builds to finish it won't cause any trouble or something.

I also think context might matter with the quote above. Because I can come up with situations where its use wouldn't be the best of ideas. But generally speaking...  no worries.


----------



## SirDice (Jul 5, 2017)

Make sure you read /usr/ports/UPDATING. Sometimes ports need to be rebuild in a specific order and portmaster(8) won't do that automatically. Which is the main reason why `portmaster -a` would be bad to do.


----------

