Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
114 lines (100 sloc) 3.29 KB
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>Alan Siu</string>
<string>Ignore Catalina Upgrade</string>
# Update you want to check to see that is ignored
update_to_ignore='macOS Catalina'
# Check to see whether the update to ignore is in the Inactive Updates
ignore_check=$(/usr/bin/defaults read /Library/Preferences/ InactiveUpdates | /usr/bin/grep "$update_to_ignore")
# See if the check is empty
if [[ -z "$ignore_check" ]]; then
/bin/echo "Ignoring of $update_to_ignore is not installed"
exit 0
/bin/echo "Ignoring of $update_to_ignore is installed"
exit 1
# Update you want to check to see that is ignored
update_to_ignore='macOS Catalina'
# Ignore it
/usr/sbin/softwareupdate --ignore "$update_to_ignore"</string>
import subprocess
# Update you want to no longer ignore
update_to_ignore = "macOS Catalina"
# As far as I can tell, there isn't a way to just stop ignoring one update. Yes, it's highly
# unlikely that a Mac admin will have multiple updates to ignore, but this is a lot cleaner to
# preserve other ignored updates while no longer ignoring the one specified in this nopkg
# Output to disregard
disregard = ["(", ")", update_to_ignore]
# Updates to keep ignoring
restore_ignore = []
# Get the currently ignored updates
currently_ignored = subprocess.check_output(
# Parse the output
for line in currently_ignored.splitlines():
# Take out the whitespace and the extra comma at the end if there is one
ignored_update = line.strip().replace(",", "").replace('"', "")
# If the update (or line) is not in what to disregard...
if ignored_update not in disregard:
# ... then mark it to be restored to updates to ignore
# Reset ignored updates["/usr/sbin/softwareupdate", "--reset-ignored"])
# Keep ignoring any other updates that were ignored before
if restore_ignore:
for ignored_update in restore_ignore:["/usr/sbin/softwareupdate", "--ignore", ignored_update])</string>
You can’t perform that action at this time.