LinuxmacOS

Where Does Devbox Store Config and Packages?

Devbox keeps devbox.json and devbox.lock in your project, links packages into .devbox, and installs everything under /nix/store.

Last updated

Devbox splits declarations from storage the Nix way. Your project holds a small JSON file and a lock. The actual packages live once in the read-only Nix store and get symlinked into .devbox per project.

That design makes .devbox disposable. It regenerates from the lock on every shell start. Back up the JSON and lock, ignore the folder, and resets become trivial.

Where Devbox stores this, by platform

Linux
<project>/devbox.json + devbox.lock

Project declarations plus lock. Both belong in version control. Global variant sits at ~/.devbox/global/devbox.json.

Linux
<project>/.devbox

Per-project symlinks into the Nix store. Disposable, regenerates on shell start. Same on macOS.

macOS
/nix/store

Immutable package storage shared by every project. Same path on macOS with a working Nix install.

Frequently asked questions

What Devbox files belong in git?

Commit devbox.json and devbox.lock. Add .devbox to gitignore. The lock pins exact nixpkgs commits so teammates resolve identical packages.

How do I reset a broken Devbox shell?

Delete .devbox and run devbox shell again. Packages re-link from the Nix store. Your declarations are safe in devbox.json.

Where are global Devbox packages?

Global packages live in ~/.devbox/global/devbox.json and apply across projects. Project files override them when both declare the same package.

Notice an outdated path? Let us know.