Sub topic 16
Keeping apps updated
This chapter assumes you can open System Settings and the App Store app, and that you know the difference between an app, a .dmg and a .pkg. The Terminal section is optional.
Updates are a security task. Most attacks on a Mac use a known flaw that the developer has already fixed. An old app keeps the flaw. How you update depends on where the app came from.
Updates from the Mac App Store
Apps installed from the Mac App Store update through the App Store app.
- Open the App Store app.
- Click Updates in the sidebar.
- Click Update next to one app, or Update All.
To update automatically, open the App Store menu, choose Settings, and turn on Automatic Updates. macOS updates also appear in System Settings under General, then Software Update. There you can turn on automatic installation of security responses and system files.
Store updates keep the same sandbox and review rules as the first install. The app cannot gain new abilities without going through Apple's process again.
Updates for apps from the web
Apps installed from a .dmg or .pkg update themselves, and each one does it in its own way. Most commonly:
- The app has a built-in updater. Many apps use a framework called Sparkle, which appears as Check for Updates… in the app menu.
- A separate helper program runs in the background and checks for new versions.
- The app has no updater. You download the new version from the developer's site and replace the old one.
A built-in updater should still be trusted carefully. Check that it uses HTTPS and that the new version is signed by the same developer. The Terminal commands from earlier chapters work here too.
codesign -dv --verbose=4 /Applications/Example.app 2>&1 | grep -E 'Authority|TeamIdentifier'Run this before and after an update. The TeamIdentifier should not change. If it does, stop and ask the developer why.
Common errors
- Searching for an update on a random site. Always go to the developer's official site, or use the app's own update menu.
- Clicking an "update" pop-up in a browser. A message such as "Your Flash Player is out of date" is a classic scam. Real updates come from the app itself, not from a web page.
- Leaving unused apps installed. Apps you no longer open still carry old flaws. Remove them, as covered in the next chapter.
- Ignoring Apple's warnings. If macOS says an app is no longer compatible or has been blocked, read the message instead of dismissing it.
Updating Homebrew casks
If you installed an app with Homebrew, update it with Homebrew.
brew update
brew outdated --cask
brew upgrade --caskThe first command refreshes the list of available versions. The second shows which casks have newer versions. The third installs them. Some casks use their own updater and are marked auto_updates. Homebrew skips these unless you add --greedy.
Exercise
You installed an app from a .dmg and it has no Check for Updates menu item. How do you update it safely, and how can you confirm the new version comes from the same developer?
Show answer
Go to the developer's official site, which you have already vetted, and download the new version. Replace the old app. Then run codesign -dv --verbose=4 on the app and compare the TeamIdentifier with the value from before the update. It should match.