pg_archivecleanup: clean up PostgreSQL WAL archive files
pg_archivecleanup [OPTION]... ARCHIVELOCATION OLDESTKEPTWALFILE
What it does
Removes WAL files older than the given one from an archive directory (for example as a replica's archive_cleanup_command). Never use it on pg_wal of a running server.
Options you will use
-d- generate debug output (verbose mode).
-n, --dry-run- dry run, show the names of the files that would be removed.
Try pg_archivecleanup in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.