Why Do Macs Leave Garbage Files Like “ds_store” On My Flash Drive, And How Do I Stop It?

Ads by Google

mac trash files“What’s all this crap?” she complains. You’ve just handed back her USB drive, now plugged into her PC.

What?” you ask.

“On my flash drive,” she says. “There are all of these…stupid files.”

Are you sick of explaining why your Mac – despite being superior in every way to her PC – feels the need to leave behind a bunch of files on her USB key? Or network drive, for that matter? Stop it from happening.

Indexing, trash bins, folder positions – OS X keeps track of all these things, on every drive connected to your Mac, by creating files. These files are fine on a Mac – OS X uses them regularly, and hides them from the user. Plug a drive mainly used with Windows into a Mac, however, and in Windows you’ll see a variety of useless files cluttering things up. Do you want to stop the madness? You can.

The Problem

Feel unclear what the problem is? Insert any flash drive readable by Windows – FAT, in all likelihood – into your Mac. Eject it, then insert it into a Windows computer. You’ll be greeted by this nonsense:

mac trash files

Ads by Google

What’s all that crap? Well, the Spotlight and Trash folders should be obvious – they’re related to indexing and deleted files, respectively. The folder “.fsevents” records file system events. It’s a record of everything that happens on the drive. And the infamous “DS_store” file – not pictured above – records things like the placement of icons in Finder.

This is all useful to Macs, but in Windows it’s just annoying. Why does OS X write such files to drives formatted FAT, knowing Windows users will see it as nonsense? Good question.

Your Mac creates these files basically the second you plug in a drive, so there are two things you can do – delete the files before you eject the drive or stop the Mac from creating the files. I’m going to outline some apps, starting with two that take the first approach before moving on to two that take the second.

Automatically Delete the Files Before You Eject

If you think you can remember to use them, two different application can delete all of these files when you eject. Simply add the app icon to your dock and you’re ready to use it.

The first such app is Eject For Windows, which despite its name is actually a Mac program. Drag any drive you want to eject here and all of the crap files will be deleted:

junk files on mac

Another app, called HiddenCleaner, works the same way:

junk files on mac

I tested both of these apps using Mountain Lion and Windows 7 – the Mac left no ugly files that the PC could see. Because both apps work the same way, you can pretty much choose based entirely on which icon you like best. I’ve got to say, Hidden Cleaner wins for me on that front (it’s up to you, though).

Stop The Files From Being Created

Want to stop these nonsense files from even appearing on non-Mac drives? Install BlueHarvest. This app installs as a preference pane, allowing you to configure when such files are created:

junk files on mac

There’s a 30-day trial, but if you want to keep this app around you’re going to need to pony up $15. If crap files on Windows drives is something you really, really care about, check out BlueHarvest.

Mostly concerned about .DS_Store files on network drives? TinkerTool, a free configuration tool, can handle that. The first screen of this app allows you to stop your Mac from leaving crap files on network drives:

mac trash files

Check that box and your Mac will stop creating such files. This program does a lot more, so read more about Tinkertool. It’s not as complete as BlueHarvest – no support for USB drives – but combined with a tool like Hidden Cleaner you’ll be completely set.

Cross-Platform

Getting a file from a PC to a Mac used to be a big deal – file incompatibilities were a fact of life. These days the two platforms play more-or-less nicely with each other – yet annoyances like this persist. I think OS X should be smart enough to tell when a drive is meant to be shared with Windows computers and adjust accordingly, but I want to know what you think.

Is this not nearly as big a deal as I’m making it out to be? Or do you also think something at the system level should be done to fix this? Let us know in the comments below, along with links to any other tools for solving the problem.

Join live MakeUseOf Groups on Grouvi App Join live Groups on Grouvi
Mac Troubleshooting
Mac Troubleshooting
7 Members
Apple Hardware Discussion
Apple Hardware Discussion
9 Members
Apple News & Rumors
Apple News & Rumors
9 Members
Apple TV Tips & Hacks
Apple TV Tips & Hacks
6 Members
Mac Switchers
Mac Switchers
7 Members
Mac OS X & Software
Mac OS X & Software
6 Members
Mac Gamers
Mac Gamers
5 Members
Ads by Google
Comments (29)
  • ci_roma

    Hi guys!!
    I brought my usb/ mp3 to an internet cafe to get something printed and when I came back all my files had been moved to this folder .Trashes

    What’s more, every time I try to move my stuff OUT of this folder, SOMETHING moves it all back into it!

    I don’t understand anything about computers but it seems that none of the programs above are for Windows (I’m using Windows 8). I even tried formatting the thing but .Trashes is still there…

    Would anybody have a suggestion on how to clear this on a Windows platform, please?
    tnx

  • PC’s the best

    In no way is mac superior to PC!

  • Zac

    I don’t see why Macs can’t just save this stuff to the computer itself and then they wouldn’t have to write it to the USB. It does make sense for trash though, unless they just change it to delete entirely like Windows does on removable drives.

    • Justin Pot

      The idea, if I had to guess, is that this date be persistent from one Mac to the other. But I agree: ideally these files shouldn’t show up on FAT drives.

  • John.s

    The ‘superior’ mac, leaving files on private network shares of my customers … nice one.
    Man, mac is great, for what is is. An OS for people like content creators,home users, people that do email,web,chat video and stuff…. but for people wanting to do other things it is a junk.

    – Try testing WiFi’s and use a usb wifi card capable o packet injection
    – Try connecting over serial to a Cisco router/Other appliance
    – Try desktop sharing remote,secure, from a windows/linux to a mac
    – Try installing a linux distro on a macbook for on-demand needs.
    – Try using the ‘activity monitor’ to tel in 5sec what is slowing you down or something
    – Try deleting temp/disk cache fast in case of an emergency – bad ppl. entering to get confidential data
    – Try using tools needed by sys/network admins …

    – Try asking how you do something more advance on the apple forum, and the first “answer” is “-but why do you want to do that, it just works! :)

    • Justin Pot

      I’ve done a few of these with my Macbook, but it’s true: Macs aren’t perfect for everyone. You won’t get any arguments from me.

  • Happy PC user

    “… your Mac – despite being superior in every way to her PC …”

    ROTFL, some kind of ego issues? Oh wait… why it’s always a Mac user who tries to convince everybody around that the Mac doesn’t suck (that bad)? But the numbers don’t lie, the so called “superior” Mac is faaaaaaaaar behind Windows userbase. Simple as that.

Load 10 more
Affiliate Disclamer

This review may contain affiliate links, which pays us a small compensation if you do decide to make a purchase based on our recommendation. Our judgement is in no way biased, and our recommendations are always based on the merits of the items.

For more details, please read our disclosure.
Affiliate Disclamer

This review may contain affiliate links, which pays us a small compensation if you do decide to make a purchase based on our recommendation. Our judgement is in no way biased, and our recommendations are always based on the merits of the items.

For more details, please read our disclosure.