# FreeBSD upgrade



## cahimira (Apr 25, 2010)

Hi,

I have a FreeBSD installation only with binary packages (no compiled ports) and I need a script for update my FreeBSD box every day. I research a little and I have this list:

1- Fetch security/important patches:

`freebsd-update fetch`

2- Fix the package registry database:

`pkgdb -F`

3- Install the most recently fetched updates or upgrade:

`freebsd-update install`

4- Update ports (usign only available binary packages):

`portupgrade -PP -a`

Questions:

a- Is the list complete and correct?
b- Exists a utility (script or GUI) for make this job more professional?
c- Is correct only use binary packages on a installation?
d- If I use "portupgrade" (step 5) , I need portsnap command as well ?


----------



## SirDice (Apr 25, 2010)

Just a tip. Don't do this automatically, each day. Sometimes ports need to be updated in a specific order. This is usually explained in /usr/ports/UPDATING.

Also, if you track any RELEASE versions doing a freebsd-update daily is too much. RELEASE versions don't change that often.


----------



## cahimira (Apr 26, 2010)

SirDice, thanks for your tip, but the 4 steps are correct?


----------



## SirDice (Apr 26, 2010)

cahimira said:
			
		

> SirDice, thanks for your tip, but the 4 steps are correct?



Looks ok but steps 1 and 3 belong together. Step 2 isn't always needed and is related to step 4.


----------



## phoenix (Apr 26, 2010)

You can make things even simpler:


Fetch and install security/important patches:
`# freebsd-update fetch install`
Update installed ports (using only available binary packages):
`# pkg_upgrade -a`

Install /usr/ports/sysutils/bsdadminscripts.  That includes the pkg_upgrade tool.  Then delete your entire /usr/ports directory, as it's not needed for a binary-packages-only system.


----------

