Last Updated: February 25, 2016
· dyba

Removing Apple Quarantined Metadata on Downloaded Files


xattr -c filename removes Apple Metadata

The Problem

I recently had trouble logging on to IRC. The symptom was a failed TLS handshake because the certificates my IRC client uses to check against the server I log on to were not matching the ones the server was providing.

Short History Leading Up

A little history might help to shed light on my setup. I use weechat for an IRC client. The computer on which I was experiencing trouble now runs Apple's Mountain Lion OS. I had not logged on to IRC using this computer for a long time. A few days ago, I decided to upgrade weechat and download the correct certificates to log on to Freenode.

My Findings

I noticed something strange on the certificates I downloaded. When I ran the ls -l command, they all had @ symbols suffixed to them. I did a Google search and found out that any file on a Mac OS X system that has an @ symbol appended to the permissions list has Apple metadata attached to it. Here's an example of what you would see if you run the ls -l command on a file that has Apple metadata:

-rw-r--r--@ 1 Paintdexter  admin  163557414 Dec  1 16:55

You can see what that metadata is by running the xattr command [1].

>_ xattr

In order to remove it, you need to run the command xattr -c yourfile:

>_ xattr -c

That should remove the metadata from your file. Running the ls -l command, you'll see the @ symbol has been removed:

-rw-r--r--  1 Paintdexter  admin  163557414 Dec  1 16:55

After removing the Apple metadata from the certificates I downloaded, I had no trouble connecting to Freenode on IRC.