macOS · Bash
List Pending Software Updates on macOS
Lists pending macOS and security updates from Apple's update server. It does not install anything.
Script Library
Live data28scripts
- Windows18
- macOS5
- Linux5
By category
- Network3
- Disk and storage4
- Inventory4
- Security9
- Updates4
- Maintenance4
Last reviewed: November 6, 2026
CODE
Script
list-software-updates-macos.sh
#!/bin/bash
softwareupdate --list 2>&1Caution: Running a script is a sensitive action. Do not run code you have not read. A non-zero exit code shows as a failure in Moftgate output.
HOW IT WORKS
Run it on every device with Moftgate
- 01
Add the script
In the Moftgate console, open Scripts > New script and paste the code.
- 02
Select the OS
Select macOS as the target operating system.
- 03
Test it
Run it on one test device first and read the output.
- 04
Roll out
Send it to all targets by group, profile or tag. Each device result is recorded separately.
RELATED SCRIPTS
These may help too
Windows · PowerShell
Check for a Pending Reboot on Windows
Checks Windows Update, Component Based Servicing (CBS) and pending file rename entries. Reports why a reboot is needed.
Windows · PowerShellList Recently Installed Windows Updates
Lists installed hotfixes with KB number and install date, newest first.
macOS · BashFlush the DNS Cache on macOS
Flushes the dscacheutil cache and reloads mDNSResponder. Requires root.
ENTERPRISE SECURITY & BUSINESS RESILIENCE
Manage scripts from one console
Target selection, a confirmation step, per-device output and an audit log. The first 200 endpoints are free for a year.