pkg update -f and pkf upgrade -f
-
@kevindd992002 said in pkg update -f and pkf upgrade -f:
@bmeeks said in pkg update -f and pkf upgrade -f:
@kevindd992002 said in pkg update -f and pkf upgrade -f:
@bmeeks said in pkg update -f and pkf upgrade -f:
@kevindd992002 said in pkg update -f and pkf upgrade -f:
The next update will modify/rewrite most of the files, I understand that. What I don't understand is why the need to do a
pkg upgrade -f
after the upgrade. What does this accomplish?Ah, I understand your question a bit better now. All
pkg upgrade -f
does is force thepkg
utility to reinstall all the concurrently installed package files whether they are "current" or not. Normally the utility will only install (or download and write files to disk) when there are newer versions posted on whatever remote repositorypkg
is pointed at. The "-f
" flag just tellspkg
to download and rewrite all of the installed package files regardless if they are already current.So the effect with that switch is everything
pkg
initially installed is installed again. This would touch all of those files and rewrite their physical content to disk.Yeah, I figured that that's what it will do by reading this
Now, as I understand it you also need to update the catalogue before doing an upgrade. That's where
pkg update -f
comes in. This says that the -f switch will force a full download of the repository. Without it, does it just do a differential download of some sort?Yes, it always attempts to minimize the amount of downloaded/installed data when possible. The
-f
switch overrides that behavior. If you are familiar with how the Linux package managers work (apt, rpm, etc.) it's the same idea. The normal behavior downloads the smallest bits possible to accomplish the task.pkg
on FreeBSD is the equivalent ofapt
on Ubuntu.Yes, I do have a Debian system and I use apt update and apt upgrade. The only difference is that they don't have a -f switch which got me confused.
They have a
--force
switch or something similar. Been a while since I've needed to use either from the command line. -
apt-get does, but not apt. Anyway, will doing a pkg update -f do any potential damage compared to just letting its thing do without the switch?
-
@kevindd992002 said in pkg update -f and pkf upgrade -f:
apt-get does, but not apt. Anyway, will doing a pkg update -f do any potential damage compared to just letting its thing do without the switch?
No, so long as you have not manually monkeyed with the
repo.conf
file and say pointed it at some other remote repository that might contain different versions of stuff. But with a stock pfSense installation there is no harm in using the-f
switch other than just downloading and rewriting data that strictly does not require such.