Archive for November 20, 2012

Clearing the quarantine extended attribute from downloaded applications

November 20, 2012 5 comments

When I’m packaging an application for deployment, I normally download the latest version from the vendor. If it’s a drag-and-drop install, where the application is a self-contained bundle, it will get the extended attribute associated with it.

The quarantine attribute is added by the OS so that it can ask for user confirmation the first time the downloaded program is run. Gatekeeper in Lion and Mountain Lion also uses the attribute to determine if an application should be checked (and blocked if needed.)

To avoid issues with both unwanted messages and Gatekeeper, I normally clear this attribute as part of my packaging. Here’s how to check to see if your application has the attribute associated with it:

1. Open Terminal

2. Run the following command:

xattr /path/to/

If the attribute is associated with the application, you should see the following output:

computername:Applications username$ xattr /path/to/
computername:Applications username$

Note: Other attributes may also be listed, with being a common one.

To remove the quarantine attribute, you would then run the following command:

sudo xattr -r -d /path/to/

That will recursively remove the attribute from the application. The -r option will allow the quarantine attribute of all files inside the application to be selected, while the -d option causes the given attribute name (and associated value) to be removed.

%d bloggers like this: