Is it safe to delete ._ files, and what does dot_clean do?
- Yes, on a drive that goes into a TV, car stereo, camera or Windows PC. A
._file holds only Mac extras for the file of the same name, such as Finder tags and the quarantine flag, never the file’s contents. - What it costs you: those extras, for the files whose
._partner you remove. For music, photos and videos that’s nothing you’d miss; very old Mac files that keep data in a resource fork can stop working. - Does it come back? Yes, whenever a Mac copies or changes files on that drive again.
dot_clean, built into macOS, clears them. - SiftMac’s verdict: Safe
1. What it is
Mac files can carry information beside their contents: extended attributes such as Finder tags and the flag that marks a file as downloaded from the internet, Finder info, and on old files a resource fork. APFS and Mac OS Extended store all that inside the file system. A drive formatted ExFAT or FAT32 has nowhere to put it, so macOS writes it to a separate file with the same name and ._ in front, in a format called AppleDouble. Apple’s engineers describe zip archives the same way: a format with no place for Mac metadata gets AppleDouble files.
On a Mac you never see them, because macOS hides them and pairs each one with its file. A TV, a car stereo, a camera or Windows shows them as extra files that won’t open, which is why a music stick suddenly lists two of every song.
2. Where it is
Beside each file a Mac copied or changed on a non-Mac drive:
/Volumes/MyDrive/Song.mp3
/Volumes/MyDrive/._Song.mp3
In zip files made with Finder’s Compress, the same information goes into a __MACOSX folder instead, which is what Windows users see after unzipping. To list the ._ files on a drive:
find /Volumes/MyDrive -name '._*' -type f
3. How big it gets
Each one is small, usually a few kilobytes, but there’s one for every file a Mac has touched, so a stick holding thousands of songs carries thousands of them. To count them, then add up their size:
find /Volumes/MyDrive -name '._*' -type f | wc -l
find /Volumes/MyDrive -name '._*' -type f -exec du -k {} + | awk '{s+=$1} END {print s " KB"}'
Your Mac’s own APFS disk normally has none, since the information lives inside the files there. A few can arrive in folders unzipped or copied from elsewhere.
4. How to delete them safely
dot_clean comes with macOS. With the drive connected:
- Find the drive’s name in Finder’s sidebar. In Terminal it’s
/Volumes/followed by that name. - To remove every
._file on it, rundot_clean -mon the drive. Its manual says-malways deletes dot-underscore files. - To remove only orphans, the
._files whose real file was deleted on a TV or a PC, use-ninstead: it deletes a dot-underscore file only when there’s no matching file. - Eject the drive in Finder before unplugging it.
dot_clean -m /Volumes/MyDrive
Run with no option, dot_clean merges each ._ file’s information into its partner file; -m also deletes the ._ files, which is what a drive for other devices needs. A zip file’s __MACOSX folder can simply go to the Trash after unzipping.
5. What happens afterwards
- Songs, photos and videos play and open as before, because their contents were never in the
._files. - Files on the drive lose their Mac extras, such as Finder tags.
- Plug the drive into a Mac and copy or edit files on it, and new
._files appear for those files. - Old Mac files that keep data in a resource fork, such as classic font suitcases, can break without their
._partner, so leave drives holding those alone.
Questions
What does dot_clean do?
It merges ._ files with the files they belong to. With -m it always deletes them, with -n it deletes only those with no matching file, and with neither it merges their information back. It works through a folder and everything inside it, or a whole drive under /Volumes.
Are ._ files a virus?
No. They’re how macOS keeps Mac information on drives that can’t store it. They look odd on Windows or a TV only because those don’t know to hide them.
Can I stop my Mac creating ._ files?
Not on ExFAT or FAT32: that’s the only way macOS can keep the information there. Formatting the drive as APFS or Mac OS Extended stops them, but most TVs, car stereos and Windows PCs can’t read those formats.
Why does a zip from a Mac have a __MACOSX folder?
Finder’s Compress stores each file’s Mac information there as AppleDouble files. Anyone not on a Mac can delete the folder after unzipping.
How SiftMac handles it. SiftMac doesn’t list or remove ._ files. Its duplicate and large-file scans look only in your own folders in your home folder and skip hidden files, so they never show up there; for a USB stick or SD card, dot_clean is the right tool.
Download SiftMac · scanning is free, and so is your first 2 GB of cleaning · See how it works