Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
AutoUpdate is a crucial feature for maintaining the security and performance of your macOS device. It ensures that your system, applications, and security patches are up-to-date without manual intervention. This article will guide you through enabling and managing AutoUpdate on macOS, highlighting its importance and providing practical examples to help you maintain your system efficiently.
Examples:
Open System Preferences:
Navigate to Software Update:
Enable Automatic Updates:
Advanced Settings:
For users who prefer command-line management, macOS provides the softwareupdate
command.
Check for Updates: Open Terminal and run:
softwareupdate -l
This command lists all available updates.
Install All Available Updates:
sudo softwareupdate -ia
This command installs all available updates. You may be prompted to enter your admin password.
Install Specific Updates:
sudo softwareupdate -i "UpdateName"
Replace "UpdateName"
with the specific update identifier from the list obtained in the previous step.
Enable Automatic Updates:
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticDownload -bool true
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CriticalUpdateInstall -bool true
sudo defaults write /Library/Preferences/com.apple.commerce AutoUpdate -bool true
You can schedule periodic checks for updates using the launchd
service.
Create a Launch Daemon:
Create a new plist file in /Library/LaunchDaemons/
named com.example.autoupdate.plist
with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.example.autoupdate</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/softwareupdate</string>
<string>-ia</string>
</array>
<key>StartInterval</key>
<integer>86400</integer> <!-- 86400 seconds = 24 hours -->
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Load the Daemon:
sudo launchctl load /Library/LaunchDaemons/com.example.autoupdate.plist
This setup will check for and install updates every 24 hours.