Explainer: How is XProtect’s data updated?
If there’s one topic that needs explanation currently, it’s how macOS updates XProtect’s data. Let me try.
Up to and including macOS Sonoma
Until this changed in Sequoia, updating XProtect has been straightforward: its data is stored in a bundle named XProtect.bundle, in the path /Library/Apple/System/Library/CoreServices, on the Data volume so it can readily be updated. When you or macOS downloads and installs an XProtect update, it simply replaces that bundle with the new one. This is shown in the diagram below.
The source of those updates is Apple’s Software Update Service, through the Software Update pane in System Preferences or System Settings, the softwareupdate
command tool, or an app like SilentKnight. Left to its own devices, macOS normally checks for updates soon after starting up, and once every 24 hours running after that.
Early Sequoia
XProtect in macOS 15 prefers not to use the XProtect.bundle in its old location of /Library/Apple/System/Library/CoreServices, instead looking for XProtect.bundle in its new location, /var/protected/xprotect.
However, when you or your Mac use the old update system, including Software Update, softwareupdate
or SilentKnight, that still installs the update in the old location, where it won’t normally be used by XProtect when making its checks. What was supposed to happen in early versions of Sequoia was that at least once a day, macOS checked whether there was a newer update in the old location. If there was, then it should have automatically prepared and moved that to the new location in /var/protected/xprotect for XProtect to use.
If you wanted that to happen immediately, then you could run the following command in Terminal:sudo xprotect update
then enter your admin user’s password. The xprotect
command tool would then complete the installation of that update from its old location into its new one.
There’s also a second way that XProtect in early Sequoia could be updated, and that’s over a connection to iCloud. If that was used, then the update was installed straight into its new location, and didn’t change the XProtect bundle in the old location at all. Although Apple had used that earlier, all XProtect updates since the release of Sequoia came using the old Software Update system, so needed to be completed using the xprotect
command in Terminal.
This is shown in the diagram below. The blue boxes show the old Software Update system, and the pink boxes are the new parts that ensure the update is installed in the new location.
Later, that changed and Apple started releasing updates via iCloud. By about macOS 15.3, xprotect update
was no longer able to install XProtect in the new location, and that was only possible once that update had been released to iCloud, from where xprotect update
could download and install it to the new location.
Late Sequoia and Tahoe
With the release of macOS 26.0 Tahoe, this changed again. Macs running the latest versions of Sequoia and any version of Tahoe (after 26.0 release) continue to update the old location in /Library/Apple/System/Library/CoreServices as before.
Updating the new location in /var/protected/xprotect can occur by two methods. A background service XProtectUpdateService can:
- ‘activate’ an update from the old location by installing a copy to the new location;
- use CloudKit to download an update available in iCloud and install it directly to the new location.
That service is scheduled to run once every 24 hours.
The end result can appear confusing, but is summarised in the diagram below.
There are two routes for XProtect data to be updated in the new location:
- XProtect in the old location is updated by
softwareupdate
, then XProtectUpdateService runs later and installs a copy of that update to the new location. - XProtectUpdateService runs and detects an update available from iCloud, so downloads and installs that in the new location. That occurs even when the old location hasn’t been updated yet, but depends on the update being offered in iCloud.
Both of those updates run silently, and the only ways to check that the new location has been updated are to:
- check the version in /var/protected/xprotect,
- run
xprotect version
, - use SilentKnight or Skint.
As far as the user is concerned:
- Updating XProtect in the old location is worthwhile, as it should enable XProtectUpdateService to update the new location from that.
- Running
xprotect update
in Terminal is only worthwhile if the new location hasn’t yet been updated, but that update has been released via iCloud, as confirmed usingxprotect check
. - Either of the new update mechanisms should be run automatically within 24 hours of an update being released.
Summary
- In macOS Sonoma and earlier, XProtect updates come via Software Update, and are simple.
- In macOS Sequoia and later, XProtect updates are more complex, but should happen as if by magic within about 24 hours of their release.