How to remove ‘Extended Attributes’ e.g. ‘Where from’ property details from Files

Imagine you have downloaded a file from a website or especially Google Drive shared folder and when you select the same file on your local Macintosh HD and use the ‘Command + I’ command on your Mac’s Keyboard what you see is a long list of gibberish URL the file you downloaded from under ‘Where from’ section.

It looks something like this:

Now you want to get rid of this Where from section gibberish from your file or all files inside the folder, You may ask how to do it? The answer simply follows these simple steps.

To remove specific ‘Where from’ attribute from file:

Use the ‘xattr’ command with the ‘-d’ flag and then describing the command to delete specific attributes. Here ‘Where from’.

xattr -d filename.txt

To remove all extended attributes from the single file:

Use the ‘xattr’ command with the ‘-c’ flag to clear all the attributes.

xattr -c filename.txt

To Remove All Extended Attributes from All files inside one folder:

To recursively remove extended attributes on all files in a directory, combine the ‘-c’ clear flag with the ‘-r’ recursive flag:

xattr -rc /path/to/directory

Important Note: If you have a long path with spaces or special characters then you can use this trick. Open and start typing xattr -rc , include a trailing space and then drag the file or folder to the window and it will automatically add the full path.

Note: I have referred to this post from stack overflow for solving the above problem.

I hope this information helps and you to complete your task.

Thanks & Regards
Mandar Apte

Mandar Apte

Mandar is a Mumbai-based multi-disciplinary designer with UX/UI, Logo, Symbol, and Brand Identity design expertise. He currently runs his Mudrkashar Linguistic Apple iPhone, iPad, and Mac app business in the heart of Mumbai city.

Leave a Reply