Keeping FreeBSD up to date 101 questions

I'm trying to understand the basic, bare-minimum steps I need to take to keep my installation (security updates) patched and "up-to-date"..

I have installed:

$ uname -a
FreeBSD freebsd 15.1-RELEASE-p6 FreeBSD 15.1-RELEASE-p6 releng/15.1-n283643-95719d8a895b GENERIC amd64

Do I simply need to issue these 2 commands from time to time? How often should I check for and apply updates? Daily, weekly, monthly, etc.?

sudo pkg update
sudo pkg upgrade

Is that all I need? OR, do I need to follow this section titled "Manual initial setup" of this guide: https://wiki.freebsd.org/action/show/pkgbase?action=show&redirect=PkgBase

I'm simply trying to keep my desktop PC running as stable and reliable as possible.

Thank you,
Ed
 
At a minimum you should subscribe to the FreeBSD Security Advisory mailing list: send an email to freebsd-security-notifications+subscribe@freebsd.org or visit https://lists.freebsd.org/subscription/freebsd-security-notifications and subscribe through the web form. That way you won't have to be proactive in checking for security updates - you'll get an email (they usually arrive in batches with a few to several fixes pushed in one new patch level), and can take action when it's convenient.
Thank you for your suggestion...I'll sign up!

After that, is this all I need to do (when needed) to keep my system up-to-date?

sudo pkg update
sudo pkg upgrade

Ed
 
How often should I check for and apply updates? Daily, weekly, monthly, etc.?
Quarterly is normally enough.
Adding two weeks to the begin of a quarter is a good time:
mid of January, April, July and October are good.
There can be extra patches in between, and if you get them they don't hurt, of course, but you don't run into serious security issues if you have a firewall set up, do the quartely patches, have a working and reliable backup routine, and keep an eye open on the security mailing list, like epower53 said.
All security issues found and known to FreeBSD are told on the mailing list. Even here on the forums, but the mailing list is more reliable.

Most of the times it comes all as one show - quarterly:
The new patches and the mails telling about the security issues, fixed in that new patches, telling you almost always to install the new patches - update the system - to fix them.
Very seldom there is a security issue out of turn, when it's something really grave and critical. Then you're being told on that mailing list also, of course, even if no patch is available yet, and what to do until the patch is available.
But I experienced this in all my time with FreeBSD maybe two times.
FreeBSD is pretty secure.
 
Quarterly is normally enough.
Adding two weeks to the begin of a quarter is a good time:
mid of January, April, July and October are good.
There can be extra patches in between, and if you get them they don't hurt, of course, but you don't run into serious security issues if you have a firewall set up, do the quartely patches, have a working and reliable backup routine, and keep an eye open on the security mailing list, like epower53 said.
All security issues found and known to FreeBSD are told on the mailing list. Even here on the forums, but the mailing list is more reliable.

Most of the times it comes all as one show - quarterly:
The the new patches and the mails telling about the security issues, fixed in that new patches, telling you almost always to install the new patches to fix them.
Very seldom there is a security issue out of turn, when it's something really grave and critical. Then you're being told on that mailing list also, of course, even if no patch is available yet.
But I experienced this in all my time with FreeBSD maybe two times.
FreeBSD is pretty secure.
Great, thank you!

Ed
 
After that, is this all I need to do (when needed) to keep my system up-to-date?
it's not needed if you installed with pkg base.
Otoh, if you didn't select pkg to manage the base FreeBSD install (the installer lists it as new/experimental), you'll be using freebsd-update to apply security patches (kernel and userland) and pkg will only be managing the software you installed yourself:

# freebsd-update fetch
# freebsd-update install
# freebsd-version -kru
If the 1st two lines of output differ (1st line is k, the installed kernel, 2nd is r, the running kernel), reboot

# pkg upgrade

I stuck with freebsd-update when I migrated to 15.x because it's still supported and has some nice features that pkg base doesn't have worked out just yet (automatic boot environment snapshots, IDS comparison against known-good distribution sets, etc)
 
A lot of us have neither the time nor the expertise to assess the seriousness of all vulnerabilities; in my experience it's practically impossible to run a FreeBSD desktop without tolerating some. On release branches and quarterly ports packages, pretty much all updates are for security, so I tend to just look at whether updates are available with pkg upgrade -Fy. If there is nothing to do it will say so, if there is, it will download the packages and then print out what it would do without the -F.
 
so I tend to just look at whether updates are available with pkg upgrade -Fy.
I typically use pkg version -vRL= which will show a list of packages that don't have the same version as in the repositories. This also includes 'orphaned' (?) packages, and local packages that are newer than available in the repository.
 
I typically use pkg version -vRL= which will show a list of packages that don't have the same version as in the repositories. This also includes 'orphaned' (?) packages, and local packages that are newer than available in the repository.
Thank you.

I ran your command, and then: "sudo pkg upgrade". I found a few packages on my system that needed updating but a couple, one of which was Firefox, that showed:

firefox-esr-153.5.1,2 ? orphaned: www/firefox-esr

What does the "orphaned" mean?

Ed
 
I typically use pkg version -vRL= which will show a list of packages that don't have the same version as in the repositories. This also includes 'orphaned' (?) packages, and local packages that are newer than available in the repository.

I used to use that, but I'm not all that interested in that information. I want to know whether there are updates available and what would be the side effects of doing the upgrade. It's rare with security updates, but any package update can potentially add or remove packages beyond the straightforward version updates. In any case I always want to do the downloads in advance.
 
but I'm not all that interested in that information.
You are, you haven't realized it yet.

I want to know whether there are updates available
Did any of firefox-esr's dependencies show it had updates available? You might not know which dependencies are important, so I'll widen the question, did any other packages show it had updates available?
what would be the side effects of doing the upgrade.
Educated guess (based on the pkg-version output), it's going to upgrade a bunch of dependencies of firefox-esr. Then needs to update the firefox-esr package too (to keep the dependency chain intact). But it's orphaned, so it ends up getting deleted. Nothing will depend on firefox-esr, or else anything that would have depended on it is deleted too.
 
You are, you haven't realized it yet.


Did any of firefox-esr's dependencies show it had updates available? You might not know which dependencies are important, so I'll widen the question, did any other packages show it had updates available?

Educated guess (based on the pkg-version output), it's going to upgrade a bunch of dependencies of firefox-esr. Then needs to update the firefox-esr package too (to keep the dependency chain intact). But it's orphaned, so it ends up getting deleted. Nothing will depend on firefox-esr, or else anything that would have depended on it is deleted too.
I'll rephrase it as: not as interested, but I think you are mixing me up with someone else.
 
Back
Top