Where Does McFly Store Shell History?
McFly SQLite history database path on Linux, Mac and Windows, and how it relates to your normal shell history.
Last updated
McFly augments shell history with a SQLite database tracking exit status, timestamp and directory for every command. The database path follows each OS convention, with Linux defaulting under the XDG data home and very old installs using a legacy ~/.mcfly folder instead.
Your normal shell history file stays untouched alongside it. That separation is deliberate: uninstalling McFly or deleting its database never takes your underlying bash or zsh history with it. Settings like result count live as MCFLY_ variables in your shell rc, not in the database.
Where McFly stores this, by platform
~/.local/share/mcfly/history.db
Follows $XDG_DATA_HOME when set. If neither folder exists on an old machine, check ~/.mcfly/history.db, the legacy location kept for backward compatibility.
~/Library/Application Support/McFly
Standard macOS app data location. The database file itself is still named history.db, so the same SQLite tools that work on Linux open it here.
%LOCALAPPDATA%\McFly\data\history.db
McFly on Windows runs under shells like PowerShell with the same database layout. Close every shell before copying history.db or the copy may be inconsistent.
Frequently asked questions
how do i back up my mcfly history
Copy history.db elsewhere with all shells closed. SQLite dislikes being copied mid write, and McFly writes on every command. The plain shell history file needs no special handling.
how do i wipe mcfly rankings and start over
Delete history.db and run McFly once. It re-imports your shell history file on first launch, so you keep old commands while dropping the learned rankings. Scrub single entries from inside the search UI instead.
Notice an outdated path? Let us know.