Where Does Zoxide Store Its Database?
Zoxide's db.zo path per OS and the _ZO_DATA_DIR override that relocates it.
Last updated
Zoxide ranks directories in a single db.zo file whose directory follows OS conventions: XDG data home on Linux, Application Support on Mac, LocalAppData on Windows.
Set _ZO_DATA_DIR before shell init to relocate it, for dotfiles or synced setups. Migration is a plain file copy with shells closed, since there is no export step.
Where Zoxide stores this, by platform
%LOCALAPPDATA%\zoxide\db.zo
Database file. Override dir with _ZO_DATA_DIR set before zoxide init runs in your shell profile.
~/Library/Application Support/zoxide/db.zo
Same db.zo filename. Copy between machines to keep frecency ranks instead of starting cold.
~/.local/share/zoxide/db.zo
Under $XDG_DATA_HOME or ~/.local/share. Prune stale entries with zoxide remove rather than hand editing the binary-adjacent JSON.
Frequently asked questions
How do I move zoxide history to a new machine?
Copy db.zo into the matching per OS directory with shells closed. Ranks and frecency transfer exactly, unlike shell history imports.
Can zoxide share one database across OSes?
Point _ZO_DATA_DIR at a synced folder on each side. Paths inside are absolute per machine, so shared entries only help for identically pathed directories.
Notice an outdated path? Let us know.