LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pg_archivecleanup

removes old WAL archive files no longer needed by standby servers

TLDR

Clean old WAL files
$ pg_archivecleanup [archive_dir] [oldest_kept_wal]
copy
Dry run
$ pg_archivecleanup -n [archive_dir] [oldest_kept_wal]
copy
Clean with extension
$ pg_archivecleanup -x .gz [archive_dir] [oldest_kept_wal]
copy

SYNOPSIS

pg_archivecleanup [options] archivelocation oldestkeptwalfile

DESCRIPTION

pg_archivecleanup removes old WAL archive files no longer needed by standby servers. It is typically used as archive_cleanup_command in postgresql.conf (or recovery.conf in older versions). It removes all WAL files older than the specified oldestkeptwalfile.

PARAMETERS

-b, --clean-backup-history

Remove backup history files as well.
-d, --debug
Print debug logging output on stderr.
-n, --dry-run
Print the names of files that would be removed (dry run).
-V, --version
Print version and exit.
-x, --strip-extension extension
Strip this extension from filenames before deciding if they should be deleted. Useful for compressed archives (e.g., .gz, .bz2).
-?, --help
Show help and exit.

INSTALL

sudo dnf install postgresql17
copy
sudo apk add postgresql17
copy
sudo zypper install postgresql17
copy

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid