.\" Generated by scdoc 1.11.2 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "HISTCLEAN" "1" "2026-06-30" "" "General Commands Manual" .P .SH NAME .P histclean - clean shell history file .P .SH SYNOPSIS .P \fBhistclean\fR [options] .P .SH DESCRIPTION .P Clean duplicate shell commands from history files in-place, while preserving the most recent unique occurrence of each command.\& .P .SH OPTIONS .P \fB-h\fR, \fB--help\fR .RS 4 Show help message and exit.\& .P .RE \fB-v\fR, \fB--version\fR .RS 4 Show version and exit.\& .P .RE \fB-d\fR, \fB--dry-run\fR .RS 4 Print the resulted output to stdout without modifying anything.\& .P .RE \fB-b\fR, \fB--backup\fR .RS 4 Create a .\&backup copy of the history file before modifying it.\& .P .RE \fB-w\fR, \fB--which-file\fR .RS 4 Print the path to the detected history file and exit.\& .P .RE \fB-i\fR, \fB--input\fR .RS 4 Read history from instead of the default shell history file (determined by $HISTFILE).\& .P .RE \fB-o\fR, \fB--output\fR .RS 4 Write resulted output to the specified instead of overwriting the input file.\& Running the command multiple times to the same \fBoutput\fR will overwrite it.\& .P .RE \fB-s\fR, \fB--shell\fR .RS 4 Override the shell type instead of auto-detecting from \fB$SHELL\fR.\& See \fBSUPPORTED SHELLS\fR below for available shells.\& .P .RE \fB-c\fR, \fB--completion\fR .RS 4 Generate completion script for the specified shell.\& See \fBSUPPORTED SHELLS\fR below for available shells.\& .P .RE .SH SUPPORTED SHELLS .P \fB bash \fR zsh .P .SH ENVIRONMENT .P \fBHISTFILE\fR .RS 4 Path to the shell history file.\& Must be set or provided via \fB--input\fR.\& .P .P