Update Types
- Security patches: Fix vulnerabilities in base system
- Base system updates: Bug fixes and improvements
- Release upgrades: Major version changes (14.0 to 14.1)
- Package updates: Third-party software updates
Security Patches
# Check for updates
freebsd-update fetch
# Install patches
freebsd-update install
# One-liner
freebsd-update fetch install
Release Upgrades
# Upgrade to new release
freebsd-update -r 14.1-RELEASE upgrade
# Follow prompts to review changes
# Then install
freebsd-update install
# Reboot
shutdown -r now
# Complete upgrade (run after reboot)
freebsd-update install
# Reinstall packages (recommended)
pkg upgrade -f
Package Updates
# Update package database
pkg update
# Upgrade all packages
pkg upgrade
# Check for vulnerabilities
pkg audit -F
Checking Current Version
# FreeBSD version
freebsd-version
uname -r
# Patch level
freebsd-version -k
freebsd-version -u
# Package versions
pkg info
Automated Updates
# /etc/crontab
# Check for security updates daily
0 3 * * * root freebsd-update cron
# Or create script
# /usr/local/bin/auto-update.sh
#!/bin/sh
freebsd-update fetch install
pkg update && pkg upgrade -y
Update Best Practices
- Read UPDATING - /usr/src/UPDATING for source builds
- Check announcements - FreeBSD mailing lists
- Test in staging - Before production updates
- Create snapshots - ZFS snapshot before updates
- Schedule downtime - For major upgrades
beginner | System Administration | Updated 2025-01-15
- freebsd
- update
- upgrade
- security
- patches