I have an external SSD which i used on my previous mac. The SSD had couple of files tagged in various colours (green, red etc)

When i moved to new MAC, the files still retain their colours and is not corresponding to new mac, though the colours are same.

Green was from my old MAC, and I have no option of removing it from my new one.

enter image description here

  • Did you try just right clicking the file & removing the green tag? The names don't have to match
    – Tetsujin
    Apr 19, 2015 at 8:29

1 Answer 1


If the files you have issues with are self-created simple files like the text file you depicted, you can run a Terminal command on those files to clear out specific or all extended attributes. This will effectively remove ANY tag you attached previously. Once done, you can re-attach tags in the fashion you already know.

Keep in mind that some applications may use extended attributes to complement the data inside a file. So, deleting all attributes is not always the best idea. For simple (text/image) files, it should be ok however.

Here are the commands to clear the responsible extended attributes:

xattr -d com.apple.FinderInfo /drag/your/file/from/Finder/here
xattr -d com.apple.metadata:_kMDItemUserTags /drag/your/file/from/Finder/here

Here is the command for clearing ALL extended attributes on a given file:

xattr -c /drag/your/file/from/Finder/here

To know what extended attributes are attached to a file, you can run the following command in Terminal to list them:

ls -ld@ /drag/your/file/from/Finder/here

Output from that last command will look something like this:

drwxr-xr-x@ 2 youruser  staff  68 Apr 19 14:28 /your/file/from/Finder/here
    com.apple.FinderInfo    32 
    com.apple.metadata:_kMDItemUserTags 52 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .