If your external drive is used on different operating systems, you've likely stumbled upon files with a dot or a dot underscore prefix (._) in the name. They are known as dot files, ._ files, or hidden files. Some examples of dot files are: .fseventsd, .spotlight-v100, .TemporaryItems, .Trashes, .DS_Store, ._AppleDouble, etc.
These files can be concerning, as they not only drastically increase the number of files on the volume but also potentially slow down the drive when accessed using another operating system. After all, the system will begin to index dot files when accessing the drive.
What are those dot files? Why are they created? How can you remove dot files on Mac?
This guide will demystify dot files, and show you how to easily delete them with a reliable Dotfiles Cleaner.
What are dot files (._ files) on Mac?
Dot files are any files or folders on a Unix-based operating system (like macOS or Linux) whose name begins with a dot or period (.). They are created by the OS to store configuration, state & data, or metadata. Dot files are hidden by default, unless they are manually revealed or accessed on a different operating system like Windows.
Usually, there are three types of dot files:
1. Unix Hidden Files & Directories
This is a standard behavior of all Unix-like operating systems (Linux, BSD, macOS). Any file or folder whose name begins with a dot (.) is considered "hidden."
Purpose: To hide configuration and system files that the average user does not need to see in their daily workflow, preventing clutter and accidental modification.
Who creates them? The operating system and command-line utilities.
Examples:
- .htaccess: A configuration file for web servers (like Apache).
- .bash_profile, .zshrc: Scripts that run when you open a terminal shell, used to customize your command-line environment. (You might have one of these in your home directory!)
- .ssh/: A hidden folder that contains your private and public keys for secure remote login.
- .vimrc: Configuration file for the Vim text editor.
2. macOS-Specific System Metadata Files
This is where the files from your original question live. These are created specifically by the macOS Finder and system daemons.
Purpose: To store information about the file system, folder settings, and search indexes.
Who creates them? The macOS operating system (specifically the Finder, Spotlight, and other daemons).
Examples:
- .DS_Store: Stores folder view attributes (icon size, position, background, etc.).
- .Spotlight-V100, .fseventsd: Directories for the Spotlight search index and file change logs.
- .Trashes, .TemporaryItems: System directories for holding trashed files and temporary data.
- ._Filename (AppleDouble files): Created on non-APFS volumes (e.g., FAT32 USB drives) to preserve macOS-specific metadata that the foreign file system can't handle natively.
3. User and Application Configuration Files
This is a huge category and often the most numerous on your Mac.
Purpose: To store the settings, caches, and support data for applications and user processes.
Who creates them? User-installed applications and system frameworks.
Location: Most are stored in your user's home directory (~), specifically in ~/Library/Application Support/, ~/Library/Preferences/, and ~/Library/Caches/. Many also create their own dot files directly in their home folder (~).
Examples:
- .gitconfig: Configuration file for the Git version control system.
- .viminfo: Stores command history for the Vim editor.
- .vscode/: A folder created by Visual Studio Code to store project-specific settings.
- .minecraft/: A folder created by the Minecraft game for its data.
Thousands of files in ~/Library/ like com.apple.finder.plist (Finder's preferences).
Share the information about dot files on Mac!
Tool to remove dot files on Mac - iBoysoft Dotfiles Cleaner
Dot files can accumulate over time, taking up space and slowing down your system. If you wish to find and remove all unnecessary dot files at once, use iBoysoft Dotfiles Cleaner. This software enables you to right-click a selected folder from your internal or external drive to scan and permanently delete hidden files on it.
It saves the time that you would otherwise waste manually checking every folder to locate dot files. You can use it to delete hidden files on SD cards, USB drives, external hard drives, flash drives, internal hard drives, etc.
How to remove dot files from Mac with Dotfile Cleaner?
If you want to remove all dot files from your Mac automatically, follow the steps below:
Step 1: Download and install iBoysoft MagicMenu.
Step 2: Open the software, and click Extension from the left.
Step 3: Download the extension called Dotfiles Cleaner.
Step 4: Right-click on a folder and choose Clean Dotfiles.
Step 5: Select unwanted dot files and click Clean selected files.
Then the dot files will be permanently deleted from your drive.
Share this tool to help others delete hidden files on Mac!
FAQs about deleting dot files on Mac
- QCan I delete ._ files on Mac?
-
A
It depends. It's safe to delete ._ files on Mac when:
1. On a drive used only by Macs running macOS Sierra or later;
2. To clean up a drive if you decide to use it for Windows only;
3. If you don't care about the metadata on the ._ files, which typically include custom file icons, original file creation dates, files types, etc.
- QHow to view ._ files on Mac?
-
A
Some may go years without ever seeing a dot file, but you can view dot files under the following situations:
1. When you use the ls -la command in Terminal;
2. When you access a removable media (such as a USB thumb drive) that was used on a Mac computer on a Windows PC;
3. When you reveal all hidden files in Finder;
4. When you open a file compressed on a Mac.
- QHow to remove hidden files using command line?
-
A
To reveal hidden files or dot files on Mac, you can run the command ls -la in Terminal.