How to keep project dependencies from eating up space on your Time Machine Drive.

Development Jun 08, 2021

As Mac users, we use Time Machine, the built-in backup feature to automatically backup our personal data like our apps, music, photo, email and documents.

As developers, we also need to and MUST backup our project files regularly (In addition to using a source control solution like GitHub or Bitbucket to backup files in a remote location).

The problem:

Our projects usually have a lot of dependencies and those dependencies take a significant space in our Time Machine Drive. This also increases the time needed for backup.

Time Machine currently provides an option to exclude folders and files from backups. But, adding all your project dependency folders one by one and keeping track of them whenever you create or remove a project can be quite annoying.

The Solution:

Enter Asimov!

Asimov is a tool that helps you to automatically exclude development dependencies from Apple Time Machine backups.

Installing Asimov in your Mac:

You can install Asimov using Homebrew

$ brew install asimov

Asimov scans your filesystem for known dependency directories like node_modules, bower_components, Pods, VS Code extensions, etc., and excludes them from Time Machine backups.

Before you begin backup, just run asimov. You can run asimov on-demand by running

$ asimov

or schedule asimov to be run automatically every day using brew services.

$ sudo brew services start asimov

Thats It! Happy Backups!

I saved somewhere around 80 - 90 GB of disk space just using this tool.

I hope you find this tool useful.