Stop .DS_Store clutter on USB sticks from your Mac
You load an album onto a USB stick for the car, or some videos for a hotel TV, and when the device lists the files there's a mystery .DS_Store entry — or the stereo skips it, beeps, or shows it as an unplayable "track." Your Mac writes that file automatically every time it opens a folder on the stick. Switch off one hidden setting and your USB sticks stop collecting it.
Where the clutter comes from
.DS_Store stands for Desktop Services Store. It's a small hidden file Finder drops into every folder it displays, storing that folder's view settings — icon positions, sort order, window size. You never see it on your Mac because macOS hides dot-files. But a car head unit, a TV's media browser, or a digital photo frame doesn't hide them, so the file turns up in the list alongside your songs and photos, sometimes throwing off track counts or "next file" navigation. The stick isn't broken — it's just showing a file macOS meant to keep invisible.
Turn it off for USB sticks
There's no checkbox for this in System Settings. Open Terminal and run:
# Stop your Mac writing .DS_Store to USB sticks
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
# Undo, if you ever want it back
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool false
The setting kicks in after you log out and back in (or restart) — Finder only reads it at the start of a session. From then on, copying files to a USB stick won't leave a .DS_Store behind. It works the same on macOS 13 Ventura, 14 Sonoma, and 15 Sequoia.
Clear the stick you already have
Existing files stay put — the setting only stops new ones. To clean a stick you've already used, plug it in and run:
# Delete .DS_Store already on the stick
find /Volumes/USB_STICK -name .DS_Store -type f -delete
Use the stick's real name in place of USB_STICK. If your car or TV still lists odd files starting with ._, those are separate AppleDouble metadata files (common on FAT/exFAT sticks); dot_clean /Volumes/USB_STICK strips those. After both, the stick lists only your actual media.
Mainspring turns off .DS_Store on USB drives with a single labelled switch you can reverse anytime — no commands to remember. It's one of 90+ hidden macOS settings Mainspring makes one click away.
Signed & notarized by Apple · 1-day free trial · $29 once
Format matters for old devices
If a car stereo won't read your stick at all, the file system may be the issue, not the hidden files — many devices only read FAT32 or exFAT. See how to format an external drive on Mac to prepare a stick a device will actually mount.