Here is a very handy method for updating all of the software on your FreeBSD box. This gives you the ability to just “walk away” while your machine merrily hums along recompiling all your software without you having to sit around to answer prompts.

Update your ports tree

portsnap fetch && portsnap update

Check for updates and choose / update any options

portmaster -an --no-confirm

Update all ports without any confirmation questions

portmaster -aydbg --no-confirm

…Or update only specific ports without any confirmation questions

portmaster -ydbg --no-confirm portdir/port portdir2/port2

Explanations of options from the portmaster man page

-y  answer yes to all user prompts for the features below

-d  always clean distfiles

-b  create and keep a backup package of an installed port

-g  create a package of the new port

--no-confirm  
do not ask the user to confirm the list of ports to be installed and/or updated before proceeding