# Upgrade package to newer version



## teoburger (May 15, 2010)

Hallo,

what is the best way to upgrade some package to newer version?

For example php52-5.2.13 with php52-extensions --> php5-5.3.2 with php5-extensions.

Thank you.


----------



## SirDice (May 15, 2010)

The best way is to pkg_delete the old ones and pkg_add the new ones.


----------



## phoenix (May 15, 2010)

Or, pkg_upgrade them (part of the sysutils/bsdadminutils).

Or, use [cmd=]portmaster --index-only --packages-only[/cmd].

Or ...


----------



## sysman (May 20, 2010)

Doing "man portmaster" I didnt able to see --index-only or --packages-only keyswitch... Where are them exactly?


----------



## SirDice (May 20, 2010)

sysman said:
			
		

> Doing "man portmaster" I didnt able to see --index-only or --packages-only keyswitch... Where are them exactly?



Update portmaster.


----------



## zeiz (May 24, 2010)

OR
`# portupgrade -RPP <package name>`
for packages only, though myself prefer *-RP* flags that allows to update from packages + build from ports if a package required is outdated.


----------

