What's the fastest, easiest, safest and guaranteed-to-work-the-first-time method to re-install ports/packages?
pkg bootstrap -f
pkg upgrade
[415/426] Extracting en-freebsd-doc-20220326, 1: 100%
pkg: Fail to rename /usr/local/share/doc/freebsd/en/a
rticles/bsdl-gpl/.pkgtemp. bsdl-gpl_en.pdf.6JRRFKcolBz
M ->/usr/local/share/doc/freebsd/en/articles/bsdl-gp
1/bsdl-gpl_en.pdf: No such file or directory
dukester@bsdbox: ~ $
then pkg update [Read your UPDATING]pkg-static upgrade -f
pkg delete -a
Useful as a last resort but usually not really needed. In this case I would just remove that offending package and see how things go after that.One machine I was having troubles with I said screw it.
pkg delete -a
Cheers. Looks good.I need to buy you an excellent Tuborg Green!
Don't worry, that stuff is mostly for export. We don't drink it ourselves I prefer Hertog Jan myself.Never mind that 2nd-rate Heineken dish water.
freebsd-update install a third time!!
I must have missed that in the handbook.
freebsd-update upgrade -r 13.1-RELEASE
.then pkg update [Read your UPDATING] …
pkg update
anywhere in <https://cgit.freebsd.org/src/tree/UPDATING>.No. The first one that's mentioned there is done after aFour runs, in some cases.
Please see, for example, this week's <https://www.freebsd.org/releases/13.1R/installation/#upgrade-binary>.
freebsd-update fetch
, which is only to get your currently installed version up to date with the latest patches. freebsd-update -r <version> upgrade
there's only 3 install runs after a major version upgrade (and 2 if it's a minor version upgrade). Usually not necessary. Sometime ago there was a bug in freebsd-update(8) that would prevent it from upgrading to the next major version. If you have any of the versions prior to the fix then it's is actually necessary to update to the latest patch update before attempting to do the major version upgrade. In order to be absolutely sure the upgrade will actually work it is therefor advisable to make sure you have the latest patches of your currently installed version.no hint of the fetch and install (not an upgrade) that may be appropriate prior tofreebsd-update upgrade -r 13.1-RELEASE
.
pkg upgrade
usually detects the changes in the catalog and will update it automatically. In some cases this detection misses the updated catalogs (if you muck around with repositories long and often enough). Then it's useful to force update the locally cached catalog. Package repository catalogues will be automatically updated whenever pkg
upgrade is run by a user ID with write access to the package database,
unless disabled by the -U flag or setting REPO_AUTOUPDATE to NO in
pkg.conf(5).
Second install from freebsd-update(8) is more a combined installworld and mergemaster/etcupdate. The third install is more likeFirst one is the equivalent of make installkernel, second would take care of a mergemaster on /etc and other configs the third roughly make installworld.
delete-old
and delete-old-libs
.That's probably a minor version upgrade. There's nothing 'old' to remove in that case, so no use for the third install run that removes the 'old' libraries and files. But yeah, I just blindly runWhen doing it in a BE, I've often seen the third install say "nothing to do", which is actually a nice thing about freebsd-update command.
freebsd-update install
several times in a row until it tells me there's nothing more to do … yeah, I just blindly runfreebsd-update install
several times in a row until it tells me there's nothing more to do
True. I've done so many upgrades now, both from source and with freebsd-update(8). Although I know what I'm doing I still make the occasional mistake. But that's the point, I know how to recover from those mistakes. Rarely hosed a system so much I couldn't recover it though. That only happened once or twice in the past 20-25 years.I sometimes run blind without following a proper routine, paying only partial attention to what's on screen, it's OK for people who know enough about what they're doing and the consequences … the potential for trouble comes when people unwittingly do things that cause the on-screen advice to mislead them.