Is it safe to delete Nix store?

/nix/store · Do not delete by hand

What it is

Every package Nix has built or downloaded, on its own APFS volume.

Can you delete it?

No, not by hand. Deleting files by hand corrupts the Nix database. Let Nix collect garbage instead.

How to clean it safely

  1. Run: nix-collect-garbage -d
  2. Remove old profile generations first if you want more space back.

How big is it on your Mac?

This read-only command prints its size and changes nothing:

 Terminal
du -sh "/nix/store" 2>/dev/null

Step-by-step guide: Developer caches on a Mac →

Questions

Is it safe to delete /nix/store?

No, not by hand. Deleting files by hand corrupts the Nix database. Let Nix collect garbage instead.

Let the raccoon do it, safely

Junk Raccoon finds this clutter for you, shows every file first, and keeps a one-click way back. Free to download, no account, no ads.

Download for Mac