Software Update History information
system_profiler SPInstallHistoryDataType | grep -B 1 -A 4 -E '(macOS|Security).*Update\s?(\d+-\d+)?:'
Pipe to a file
system_profiler SPInstallHistoryDataType | grep -B 1 -A 4 -E '(macOS|Security).*Update\s?(\d+-\d+)?:' | grep ":" > ~/Desktop/sysinfo.txt
softwareupdate --background-critical
Read XProtect Version
defaults read /Library/Apple/System/Library/CoreServices/XProtect.bundle/Contents/Info.plist CFBundleShortVersionString
softwareupdate --background --include-config
softwareupdate --background --include-config-data
If you want to install ALL Mac updates, including Xprotect and MRT:
softwareupdate --ia --include-config-data
sudo softwareupdate -i -a --restart
Shows pending updates
sudo softwareupdate -l
Downloads but will not update
sudo softwareupdate -d
sudo find / -type f -name com.apple.SoftwareUpdate\* -exec rm -f {} \;
https://blog.rtwilson.com/how-to-reset-the-software-update-url-in-os-x/
Link:
https://community.jamf.com/t5/jamf-pro/force-xprotect-to-update/m-p/225543
https://birchtree.me/blog/install-mac-app-store-updates-with-one-line-in-the-terminal/