Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Enable and Manage AutoUpdate on macOS

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:

Enabling AutoUpdate via System Preferences

  1. Open System Preferences:

    • Click on the Apple menu in the top-left corner of your screen.
    • Select "System Preferences."
  2. Navigate to Software Update:

    • In the System Preferences window, click on "Software Update."
  3. Enable Automatic Updates:

    • Check the box that says "Automatically keep my Mac up to date."
  4. Advanced Settings:

    • Click on the "Advanced..." button to customize your AutoUpdate settings.
    • Ensure that all options are checked, including:
      • Check for updates
      • Download new updates when available
      • Install macOS updates
      • Install app updates from the App Store
      • Install system data files and security updates

Managing AutoUpdate via Terminal

For users who prefer command-line management, macOS provides the softwareupdate command.

  1. Check for Updates: Open Terminal and run:

    softwareupdate -l

    This command lists all available updates.

  2. Install All Available Updates:

    sudo softwareupdate -ia

    This command installs all available updates. You may be prompted to enter your admin password.

  3. Install Specific Updates:

    sudo softwareupdate -i "UpdateName"

    Replace "UpdateName" with the specific update identifier from the list obtained in the previous step.

  4. 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

Scheduling AutoUpdate Checks

You can schedule periodic checks for updates using the launchd service.

  1. 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>
  2. Load the Daemon:

    sudo launchctl load /Library/LaunchDaemons/com.example.autoupdate.plist

This setup will check for and install updates every 24 hours.

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.