Freebsd – How to non-interactively update FreeBSD system (and ports)

freebsd

Essentially, I am looking for a fully silent, non-interactive version of

freebsd-update fetch
freebsd-update install

and

portsnap fetch update

Best Answer

On FreeBSD-10.2 there's a new option to allow this:

freebsd-update fetch --not-running-from-cron

From the manpage:

 --not-running-from-cron
        Force freebsd-update fetch to proceed when there is no
        controlling tty.  This is for use by automated scripts and
        orchestration tools.  Please do not run freebsd-update
        fetch from crontab or similar using this flag, see:
        freebsd-update cron