# I can't understand ports-mgmt/portupgrade flags



## G_Nerc (Feb 11, 2013)

Good day!
I have a question about ports-mgmt/portupgrade. For example I want to reinstall all ports which installed before some date:
`# portupgrade -frk dbus-1.4.14_4 yakuake-kde4-2.9.8_3 -x '>2013-02-09'`
And after that command ends (all ports reinstalled), if I run it again it once again tries to reinstall all ports.
What I do wrong?


----------



## SirDice (Feb 11, 2013)

The -f option forces a rebuild of everything. See portupgrade(1).


----------



## G_Nerc (Feb 11, 2013)

Thanks for answer!
But I read portupgrade(1) and it has that example:

```
o   Rebuild and reinstall all the dependent packages of png that were
         installed prior to png:

               portupgrade -fr png -x '>=png'

         You may use a package to specify a date.
```
 It seems like my command.


----------



## SirDice (Feb 11, 2013)

And it will rebuild everything that depends on png (except png itself) every time you start it.


----------



## G_Nerc (Feb 11, 2013)

I.e *-x* flag can exclude described as argument package, but not packages by equation?
And what means:


> Rebuild and reinstall all the dependent packages of png that were
> installed *prior* to png:


 isn't it means that will be reinstalled all packages which install date less than install date of *png* package?
And 





> You may use a package to specify a date.


----------



## wblock@ (Feb 11, 2013)

What are you trying to accomplish?


----------



## G_Nerc (Feb 11, 2013)

I want reinstall needed ports with dependencies. But some dependencies not reinstalls/upgrades beause of some errors/problems and I see it only after all procedure ends.
After that I'm something correct for not reinstalled dependencies and I want reinstall again such ports with dependencies but to not wait of reinstalling all dependencies which at previous step installs fine, I want run portupgrade with equation which will exclude all ports installed before or after specified date. 
And it is not work, but in example from man portupgrade I see similar equation with (I think, maybe I wrong) needed for me target.


----------



## wblock@ (Feb 11, 2013)

Do not use -k.  That is probably what caused the problems.  If an error happens, it should halt.

-f means "install dependencies even when they seem to already be the latest version".  -fr _port_ means "reinstall _port_ and everything that depends on it".


----------

