keyboard-shortcut
d

macOS quarantine metadata

2min read

an image

When a quarantine-aware app such as a web browser downloads a file, macOS attaches the com.apple.quarantine extended attribute. This records where the file came from and tells Gatekeeper to check downloaded software the first time it opens. It is not added by every download method: tools such as curl and scp do not normally add it.

You can show or remove the attribute with xattr:

# Show the quarantine metadata
xattr -p com.apple.quarantine LazySheet_0.1.0_aarch64.dmg

# Remove it (only when you trust the file and its sender)
xattr -d com.apple.quarantine LazySheet_0.1.0_aarch64.dmg

This matters when sharing an app with friends: your local build may open normally, but their browser or chat app can quarantine the downloaded copy. Gatekeeper then checks its Developer ID signature and Apple notarisation, so an unsigned, ad-hoc-signed or unnotarised app may be warned about or blocked. Removing quarantine bypasses that first-download check. The proper distribution fix is to sign the app with a Developer ID and notarise it.

Further reading: Gatekeeper and runtime protection and notarising macOS software.