Everywhere All articles Download Buy for $19

How macOS actually works

The hidden ._ twins on your USB drive

Updated 2026-10-30 · 4 min read

Each ._ file is a hidden twin carrying a file's Mac-only information onto a drive that can't hold it. One Terminal command removes them, and the tags and comments inside go with them.

What they are and the quick way to remove them

A ._ file is a companion that macOS writes when it puts a file on a drive with nowhere to store Mac-only information. The format is called AppleDouble. The companion holds that file's extended attributes (tags, Finder comments, the quarantine flag on downloads) plus Finder info and any resource fork. ._Holiday.mov belongs to Holiday.mov. A Mac hides them; Windows PCs, TVs, car stereos and cameras can show them as clutter.

To remove them from a drive you're about to hand over, when you don't need that information:

ls /Volumes
dot_clean -m -v "/Volumes/<DriveName>"

The first line shows the drive's exact name. -m always deletes the ._ files, and -v prints each one as it goes. Plain dot_clean, without -m, merges each companion back into its file instead; that's the gentler choice for a folder you've copied back onto a Mac's own disk.

Which drives get them

macOS writes them on volumes whose format can't hold extended attributes: FAT32 and exFAT, which most USB sticks and SD cards use, and some network shares over SMB. A drive formatted APFS or Mac OS Extended stores the information with the file itself, so no ._ files appear there.

To see a drive's format:

diskutil info "/Volumes/<DriveName>" | grep "File System Personality"

ExFAT or MS-DOS FAT32 means expect ._ files. Get Info on the drive in Finder shows the format too.

Seeing them before you decide

Finder hides names that start with a dot, so look in Terminal. Both commands only read:

ls -la "/Volumes/<DriveName>/Photos" | head -20
find "/Volumes/<DriveName>" -name "._*" | head -20

You'll see pairs such as IMG_001.jpg and ._IMG_001.jpg. The companions are small, a few kilobytes at most for an ordinary photo, so deleting them frees little space. The reasons to remove them are tidiness, or a device that trips over the extra names, such as a media player that lists each ._ file as a broken track.

What dot_clean does with them

Apple's manual page describes dot_clean as merging ._* files with their native files, recursively through each folder you name. The options you'll use:

OptionWhat the manual page says
noneMerge each ._ file into its native file
-mAlways delete dot underbar files
-nDelete dot underbar file if there is no matching native file
-fFlat merge: don't recurse into subfolders
-vPrint verbose output
--keep=nativeUse the native file's information, ignoring AppleDouble files

On a Mac's own disk, a test merge for this guide moved a ._ file's tags and quarantine flag onto the real file, then deleted the ._ file. On the FAT or exFAT drive itself, that information has nowhere to go but a ._ file, which is why -m is the option that actually clears a stick.

Orphans are ._ files whose real file has gone, typically after files were deleted from the stick on a Windows PC. -n is the option aimed at them.

What you lose by deleting them

Deleting a ._ file doesn't touch the file it belongs to: photos, documents and videos stay as they are. What goes is the Mac-only information, meaning tags, Finder comments and the quarantine flag that marks a download. Copy those files back to a Mac later and the tags won't be there. If you've tagged hundreds of files on that drive for a project, copy the folder to your Mac before cleaning, and do the same for anything irreplaceable.

For what extended attributes hold, see extended attributes on a Mac; hidden macOS file behaviours covers dot-files in general.

Stopping new ones

macOS has no setting that turns them off. On a drive that can't store the information, macOS writes a companion whenever a file has something to keep there. What helps:

  1. Clean before you eject. Run dot_clean -m on the drive as the last step before it goes to a TV or a Windows PC.
  2. Copy without the metadata. cp -X skips extended attributes and resource forks, and for a whole folder ditto --norsrc does the same; Apple's ditto manual says that option also leaves out quarantine bits.
  3. Use a Mac format when only Macs read the drive. Reformatting erases it, so copy everything off first. Formatting a drive for Mac and Windows lists the trade-offs.

To copy a folder onto the stick that way:

ditto --norsrc ~/Pictures/Trip "/Volumes/<DriveName>/Trip"

Checking a drive before you hand it over

Everywhere can list the ._ files on a stick while it's still plugged in. Type the regular expression /^\._/, which matches names starting with ._, and add path: with the drive's name (path:<DriveName>) to stay on that drive; the folder under each result shows where each one sits. Connected drives are indexed once Everywhere has Full Disk Access. It sees file names only, never what a ._ file holds.

Common questions

What are ._ files on a USB drive?

They are AppleDouble companion files. When a drive's format can't store a Mac file's tags, comments or resource fork, macOS saves that information in a hidden ._ file next to it.

How do I remove ._ files from a USB drive on a Mac?

Run dot_clean -m -v "/Volumes/<DriveName>" in Terminal, with your drive's name from ls /Volumes. The -m option always deletes the ._ files; without it, dot_clean merges them into the real files instead.

Is it safe to delete ._ files?

The files they belong to aren't changed, so your photos and documents are safe. You lose the Mac-only information in them, such as tags, Finder comments and quarantine flags.

Why does my Mac keep creating ._ files?

The drive or share can't store extended attributes, which is typical of exFAT, FAT32 and some SMB shares. macOS has no switch to stop it, so clean the drive before ejecting, or copy with cp -X.

Find any file before you finish typing

Everywhere keeps track of every file on your Mac, including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.

Version 2.20.3 · macOS 13+ · 4.7 MB · notarised

Related

© 2026 Caretopia Network Private Limited Everywhere for Mac Buy a licence Articles Privacy Support