softwareupdate - macOS
Overview
The softwareupdate
command allows users to check for, install, and manage software updates for macOS. It provides a convenient way to keep systems up-to-date with the latest security patches, feature enhancements, and bug fixes.
Syntax
softwareupdate [options]
Options/Flags
- -l, –list: Lists available updates.
- -i, –install: Installs available updates.
- -d, –download: Downloads updates without installing them.
- -a, –all: Installs all available updates, including recommended and optional.
- -r, –recommended: Installs recommended updates.
- -P, –purge: Purges the downloaded update files.
- -v, –verbose: Provides verbose output during the update process.
- –fetch-full-installer: Fetches the full macOS installer instead of a delta update.
- –ignore [bundle identifier]: Ignores specified updates.
Examples
1. List available updates:
softwareupdate -l
2. Install all available updates:
sudo softwareupdate -i -a
3. Download updates without installing:
softwareupdate -d -a
4. Install recommended updates:
sudo softwareupdate -i -r
5. Force a system update by downloading the full installer:
sudo softwareupdate --fetch-full-installer
Common Issues
- Update not found: Ensure that the Mac is connected to the internet.
- Permission denied: Use
sudo
before the command to run it with administrative privileges. - Insufficient space: Ensure there is enough free space on the startup disk.
- Software update failed: Reboot the Mac and try again. If the issue persists, refer to Apple Support.
Integration
softwareupdate
can be combined with:launchctl
to schedule updatesmunki
to manage updates through a central server