From 9004bf4079e56d4dabb17222e86f1efcec87a5a0 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 29 Aug 2026 14:20:20 +0200 Subject: [PATCH] prune: remove the date-based archive filters, see #10250 --oldest/--newest/--older/--newer were accepted by the prune parser (inherited via the shared archive filters group, #7272), but never applied - borg prune --keep 1 --older=1y silently pruned minutes-old archives. Per the PR discussion, prune does not support these filters for now (--older is redundant with --keep-within, --oldest/--newest anchor on endpoints that prune itself changes), so reject them at parse time instead of wiring them up. Co-Authored-By: Claude Fable 5 --- src/borg/archiver/prune_cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/borg/archiver/prune_cmd.py b/src/borg/archiver/prune_cmd.py index 337071aff9..079109b49e 100644 --- a/src/borg/archiver/prune_cmd.py +++ b/src/borg/archiver/prune_cmd.py @@ -557,7 +557,7 @@ def build_parser_prune(self, subparsers, common_parser, mid_common_parser): action=Highlander, help="number or time interval of yearly archives to keep", ) - define_archive_filters_group(subparser, sort_by=False, first_last=False) + define_archive_filters_group(subparser, sort_by=False, first_last=False, oldest_newest=False, older_newer=False) subparser.add_argument( "name", metavar="NAME", nargs="?", type=archivename_validator, help="specify the archive name" )