Linux

Where Does cliphist Store History?

cliphist stores history in a SQLite db defaulting to cache cliphist db. Config file and env vars tune limits and paths.

Last updated

cliphist splits state from options. Clipboard entries land in a SQLite database defaulting under the XDG cache home, overridable by flag, env var, or config key. A small text config under the XDG config home sets item limits, sizes, and preview widths.

The tool owns no picker UI. History flows through pipes to dmenu, rofi, wofi, or fzf, which keeps the stored data independent of display choices. Wipe and compact subcommands maintain the db in place. Image entries store raw bytes beside text in the same tables.

Where cliphist stores this, by platform

Linux
/home/<username>/.cache/cliphist/db

History database in SQLite. Entries byte for byte with MIME metadata. Wipe or expire from the CLI.

Linux
/home/<username>/.config/cliphist/config

Options file with one key value per line. Limits, sizes, and db path overrides live here.

Frequently asked questions

How do I clear cliphist history?

Run cliphist wipe. Add an older than duration to expire by age, or compact to vacuum without deleting.

Can the cliphist database live elsewhere?

Pass the db path flag or set the matching env var. The config file key does the same persistently.

Notice an outdated path? Let us know.