Updating with freebsd-update and portsnap

Installing and upgrading FreeBSD.

Updating with freebsd-update and portsnap

Postby Itproman » 04 Nov 2012, 16:56

Speaking of updating, this is a little off topic, but is it ok after installing FreeBSD 9.0, Gnome2, Xorg, Firefox, Samba 3.6, to do a [CMD="#"]freebsd-update fetch install[/CMD] and [CMD="#"]portsnap fetch extract[/CMD], or will that mess up the system?
User avatar
Junior Member
Posts: 47
Joined: 14 Dec 2011, 22:20
Location: Hastings,Ontario,Canada

Postby Trihexagonal » 05 Nov 2012, 00:44

You only run

[cmd=#]portsnap fetch extract[/cmd]

to initially populate your ports tree. To update it anytime thereafter run

[cmd=#]portsnap fetch update[/cmd]

It won't hurt anything and you want to keep it up to date as you install programs. I run

[cmd=#]freebsd-update fetch
# freebsd-update install[/cmd]

after I've installed everything, but am already up to date at FreeBSD 9.0-RELEASE-p3 if I run it now. As to whether or not it could cause a problem there is at least one thread addressing problems that it has caused lately , but it's never caused one for me.

On the subject of updating ports, just in case you weren't aware of it, it's essential to install [file]/ports-mgmt/portaudit[/file] and to run

[cmd=#]portaudit -Fda[/cmd]

on a daily basis to stay current on any vulnerabilities, then use [file]/ports-mgmt/portupgrade[/file] to upgrade any ports that it lists as having a vulnerability to the newest version, making sure to update your ports tree before you do so.
User avatar
Posts: 156
Joined: 20 Mar 2012, 04:39

Postby Sfynx » 05 Nov 2012, 13:10

Updating FreeBSD using [FILE]freebsd-update[/FILE] should not mess up existing userland software when you stay within the same FreeBSD major version (e.g. 9.0 -> 9.1 will be fine, but 8.3 -> 9.0 will require you to rebuild all ports to fix library version bumps).
In case you do need to do extra steps after an upgrade, [FILE]freebsd-update[/FILE] will tell you about it.

With security updates within a release branch a single [CMD="#"]freebsd-update fetch install[/CMD] will do the trick (+ a reboot in case [FILE]/boot/kernel/kernel[/FILE] has been updated).
Posts: 114
Joined: 18 Nov 2008, 19:04
Location: Rotterdam, The Netherlands

Return to Installing & Upgrading

Who is online

Users browsing this forum: Google [Bot] and 0 guests