How to Exclude Specific Files and Folders from Time Machine Backups on Mac

Apple’s Time Machine provides robust, set-and-forget incremental backups of your macOS system, documents, and user profile. However, automatically backing up high-churn directories—such as virtual machine disk images, large video download caches, cloud sync folders, and developer build artefacts like node_modules—can rapidly consume your external backup disk. By configuring Time Machine exclusion rules, you can safeguard your critical personal files while preventing transient data from overwhelming your storage capacity.

Accessing Time Machine Backup Options in macOS

Exclusion lists are managed centrally through modern macOS System Settings:

  1. Click the Apple menu () in the top-left corner of the screen and select System Settings.
  2. In the left-hand sidebar, navigate to General and select Time Machine.
  3. Click the Options… button located in the bottom-right corner of the Time Machine pane to open the exclusion configuration sheet.

Adding Folders and Files to the Exclusion List

The exclusion table displays all directories, volumes, and files that Time Machine skips during scheduled backup sweeps:

  1. In the Options dialogue, click the Add button (+) located at the bottom of the Exclude from backups list.
  2. A standard Finder dialogue will appear. Navigate through your internal drive to select the folder or file you wish to exclude.
  3. Highlight the directory (for instance, your Downloads directory, a local cache folder, or a gaming library) and click Exclude.
  4. The item will appear in the exclusion list accompanied by its estimated file size, allowing you to gauge storage savings immediately.
  5. Click Done to save your configuration. Time Machine will immediately bypass these paths on its subsequent backup run.

Excluding External Storage and Network Drives

By default, Time Machine automatically excludes non-backup external hard drives and secondary APFS volumes to prevent recursive backup loops. You can verify and manage volume exclusions within the same dialogue:

  • If an external disk or secondary SSD partition appears in the exclusion list, Time Machine treats it as excluded.
  • To include a secondary data drive in your regular Time Machine schedule, select the volume from the list and click the Remove button (-). Ensure your dedicated Time Machine drive possesses sufficient capacity to hold both volumes.

Excluding Files Dynamically Using Extended Attributes (Terminal)

For software developers and advanced power users, adding dynamic build folders through the GUI can become tedious. macOS supports a native extended attribute (com.apple.metadata:com_apple_backup_excludeItem) that instructs Time Machine to ignore specific folders programmatically:

tmutil addexclusion /path/to/folder
  • Standard Exclusion (-p): Adding the -p flag creates a path-based exclusion identical to adding the item via System Settings:
    tmutil addexclusion -p ~/Projects/myapp/node_modules
  • Checking Exclusion Status: To verify whether a specific directory is currently marked for exclusion:
    tmutil isexcluded ~/Projects/myapp/node_modules
  • Removing an Exclusion: To remove a path from the terminal exclusion list:
    tmutil removeexclusion -p ~/Projects/myapp/node_modules

Best Practices for Time Machine Storage Management

Periodically auditing your Time Machine exclusion list keeps backup archives lean and ensures rapid restoration speeds over Wi-Fi or USB. Always exclude cloud storage synchronisation directories (such as Dropbox, OneDrive, or Google Drive) if those files already maintain redundant cloud backups, and prioritise your external storage allocation for unique local documents, creative project files, and system configurations.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.