[solved] pfSense + 25.07.1 check_upgrade: "Updating repositories metadata" returned error code 1 @ 2025-12-10 07:23:47
-
Well, in my case:
- I do use IPv6 (but via an HENET GIF tunnel, since my ISP does not provide native v6)
- I do have "Prefer to use IPv4 even if IPv6 is available" checked
- I do have System Patches installed, and all recommended patches applied
- I don't use Service Watchdog
- I do get this error message on every boot
edit: I've been poking around in
/usr/local/libexec/pfSense-upgradeand I think I know what's going on now. Will post back shortly. -
Well,
After messing around a bit thinking this was an IPv6 problem (it wasn't) I'm still puzzled.Still getting this on each boot:

This is on a fully patched 25.11 with System Patches 2.2.26 + all patches applied:

I note that after a reboot, the
config.xmlhas this earlyshellcmd removed:<earlyshellcmd>/usr/local/bin/php-cgi -f /usr/local/bin/apply_patches.php</earlyshellcmd>
Is that normal/expected?
-
Yes that's generated by the system patches package if you have any applied patches to auto-reapply any that are set to do so.
-
@stephenw10 Ok, so it's normal for that shellcmd to be removed even though I have System Patches installed and in use?
-
@luckman212
You mean you haven't

right now ?
That's doesn't seem normal to me.
If the System patcher package is installed, in put this in (the GUI part of the config file shown above) place :
-
Hmm, yeah, I wouldn't expect it to be removed.

Are you seeing it added and removed repeatedly?
-
@stephenw10 Yes, correct. If I go to Packages and click reinstall on System Patches, I can see that the
apply_patches.phpearlyshellcmd gets (re)added. BUT, on my next reboot, it gets removed again. -
Euh .... you have a patch that does this ? ;)
The only place where the "earlyshellcmd" gets removed is ( see /usr/local/pkg/systempatches.xml )
I image, if for some reason the current "config.xml" gets discarded by pfSense because it found an issue with it, it takes the previous config.xml - the one where "Patches" packages wasn't installed (yet), so it uninstall's it ? (?!) ( I know, a wild shot).
pfSense uninstalling packages without user GUI interaction, that's wild. -
Looking at my config.xml backups, I noticed that around 2025-07-20 the following node "disappeared" and is no longer found in any subsequent backups:
<shellcmdsettings> <config> <cmd>/usr/local/bin/php-cgi -f /usr/local/bin/apply_patches.php</cmd> <cmdtype>earlyshellcmd</cmdtype> <description><![CDATA[System Patches default earlyshellcmd. DO NOT EDIT/DELETE!]]></description> </config> </shellcmdsettings>Comparing the XML, it seems to be when the base pfSense on this unit was upgraded from config ver
22.7(pfSense 22.05.1) to24.0(25.07 probably beta/rc at that time). Not sure if that's a clue or not. -
This appears to be a rare bug. What I did to "fix" it:
- hand edit
config.xmlto remove references to theapply_patches.phpearlyshellcmd - rm
/tmp/config.cache - manually added back the following shellcmd definition:

After that, everything seems to be kosher and is surviving reboots.

Now back to the original bug reported in this thread which is still occurring...

- hand edit
-
L luckman212 referenced this topic on