unable to remove packages when offline
-
I have Netgate SG-3100 which was running pfSense+ 22.01.
-
I booted it with the factory default config, connected to the internet and uninstalled all additional packages.
-
Then, also using the web GUI, I upgraded to 23.05.1 (2 stages).
-
I installed all previously removed packages and rebooted, this time in offline mode.
-
Now, when I connected with web GUI and try to remove any package I get:
xxx removal failed! Another instance of pfSense-upgrade is running. Try again later
I waited for 10 minutes but it made no difference.
Package removal starts working again as soon as the firewall goes online.
Is it a requirement? Weird...
-
-
Yes, having Internet connectivity so the
pkg
utility can contact the remote pfSense repo is required for installing/updating/removing packages in the GUI.You can do some things on the command line using a shell prompt without Internet connectivity. In that situation, you would want to use
pkg-static
so as to use thepkg
utility binary compiled with static library links.For example, you could remove a package and you could install or update a package provided you had all the required files residing locally on the pfSense firewall filesystem. That would include all of the required dependent packages. This only works at a shell prompt. The GUI interface is going to assume Internet connectivity is present and operable, and if not it's going to complain.
What many folks fail to consider with packages is that seldom is a package a single file. Instead, the core package and then some number of shared library dependences are also installed. When Internet connectivity is present, the
pkg
utility automatically reaches out to the proper package repo and pulls down the needed dependent packages for installation. -
Thank you for this question and thank you for the answer, I learned something today
-
It might work after a while. That particular error is probably because you have the dashboard set to check for updates, so once you login it's kicking off a session of
pfSense-upgrade
to check for updates. Since you're offline, that will take a while to time out, and going back to the dashboard would start it checking again.That said, using the CLI in that specific case is probably more reliable. GUI packages are named
pfSense-pkg-<name>
when operating withpkg
orpkg-static
directly, you'll want to install/uninstall them using that name. To see what packages like that are installed, use something likepkg-static info -x pfSense-pkg
.