Hidden files and folders on APFS volumes

I’ve recently had a few questions from users who typically are trying to copy the contents of an APFS volume, and come across various hidden files and folders at its top level. This article lists some of the most common you’re likely to see, and their significance. You can also find a handy guide to the files and folders which Carbon Copy Cloner doesn’t copy in this excellent article, which additionally covers HFS+ and System volumes. Here I’m primarily concerned with APFS on data volumes.

Folders include:

  • .DocumentRevisions-V100 which is private data maintained by the macOS versioning system. There’s no point in copying this folder, even if you’re trying to create a perfect replica of a volume, as it appears to contain hard links and a database which won’t survive the transfer. This is normally locked away, and shouldn’t be tampered with unless you want to break the version system on that volume.
  • .Spotlight-V100 which contains the Spotlight indexes for that volume. Again, this isn’t portable, and shouldn’t be transferred. Instead, if you want Spotlight search to cover the volume, you should allow it to be indexed in the normal way.
  • .TemporaryItems contains miscellaneous temporary items, and shouldn’t be copied.
  • .Trashes is the volume’s Trash, and shouldn’t normally be copied.
  • .fseventsd is the File System Events database, in which details of changes made to files and folders on that volume are recorded. This isn’t portable, so shouldn’t be copied. Time Machine and other software uses it, so it should be left alone. If it becomes lost or damaged, the next TM backup can take longer as it is reconstructed.
  • .vol is the volume root placemarker for the volfs file system, a pseudo-directory. It’s unique to each volume, and created for that volume, so mustn’t be copied, and left well alone.
  • .PreviousSystemInformation is apparently of no use and shouldn’t be copied.
  • .localized may be a folder containing localised versions of the volume name for use by the Finder. It can instead be a zero-length file, indicating that the name can’t be localised. It should be ignored and not copied.

Files include:

  • .DS_Store is the Desktop Services Data for the volume’s top level, containing custom settings and information for the Finder. This shouldn’t normally be copied, and will be created when the Finder accesses a new volume.
  • .apdisk apparently stores information about mounted folders from a Windows network, and shouldn’t be copied.
  • .VolumeIcon.icns refers to any custom icon for that volume, and shouldn’t normally be copied.
  • .file is the root file inode for the volume’s file system. It’s unique to each volume, created for that volume, and mustn’t be copied, just left well alone.

You may also encounter old remnants from macOS installations, such as the files .installer-compatibility, .TempReceipt.bom and .OSInstallerMessages, and the folders .PKInstallSandboxManager and .PKInstallSandboxManager-SystemSoftware. Those should also be ignored and not copied.

Some third-party software installs hidden files or folders at the top level of data volumes. These should be named in a way that indicates their ownership and purpose, such as
.com.bresink.system.tinkertoolsystem4-0420-Evaluation.do-not-delete
You’ll need to guess what’s best to do with each. Beware that some could be signs of malware.