# How can update installed applications?



## lcy66 (Mar 8, 2012)

Hi,

How can update installed applications? For example, I have installed some applications using the pkg_add command, which command that like the "yum update" in CentOS, that will auto check and update the installed applications.

Thank you very much!


----------



## jrm@ (Mar 8, 2012)

1. Update your ports tree with something like `# portsnap fetch update.` Note: You have to do an initial `# portsnap extract.`

See portsnap().

2. Check /usr/ports/UPDATING for any ports needing special attention.

When dealing with third party applications, you have two options.  You can update with binaries or compile the source yourself.

For binary upgrades you can remove individual packages with pkg_delete and reinstall with pkg_install, use pkg_upgrade from sysutils/bsdadminscript or supply the -P[P] switch with ports-mgmt/portmaster.  The last option is the one I suggest for most cases.

Except for applications that are difficult to compile, I prefer installing from source (except on old, slow machines).  Again, my suggestion is to use ports-mgmt/portmaster for most situations, but this is just a personal preference.  It has a nice man page: portmaster().  Other options are the base tools, ports-mgmt/portupgrade or ports-mgmt/portmanager.

See the handbook for details.


----------



## wblock@ (Mar 8, 2012)

Upgrading FreeBSD Ports shows the source method.


----------

