bup-prune-older(1)
โจ NAME โจ
bup-prune-older โ bestie, this is the one that removes older saves ๐
๐ธ SYNOPSIS ๐ธ
bup prune-older [options...] <branch...>
Note the bup-prune-older(1) manual page vibe โ what you actually type is bup prune-older, and then a bunch of options, and then one or more branch names. ๐ซถ
๐ DESCRIPTION ๐
okay so here's the deal: bup prune-older removes โ and we mean permanently deletes โ every single save except the ones preserved by the various keep arguments down below. You must specify at least one keep argument, like, it's not optional, no cap. This command is basically equivalent to running a suitable bup rm invocation and then following it up with bup gc. Two steps, one glow-up. โจ
Heads up bestie: the current implementation expects a typical branch where a new save's date is always the same as or newer than the previous one. When that's not the case, only the saves at the end of the branch that have non-increasing timestamps (child to parent) will be affected by this command. Future versions are likely to lift this restriction.
โ ๏ธ WARNING: This is one of the fewbupcommands that modifies your archive in intentionally destructive ways. ๐ญ Like, for real, it's giving "no take-backs." Though if an attempt to join or restore the data you still care about after aprune-oldersucceeds, that's a fairly encouraging sign that the commands worked correctly. (Thedev/compare-treescommand in the source tree can be used to help test before/after results.) ๐
๐ฆ KEEP PERIODS ๐ฆ
A --keep PERIOD (as required below) must be an integer followed by a scale, or "forever". For example, 12y specifies a PERIOD of twelve years. Here are the valid scales, and yes, you need to memorize these, iykyk:
sindicates secondsminindicates minutes (60s)hindicates hours (60m)dindicates days (24h)windicates weeks (7d)mindicates months (31d)yindicates years (366d)foreveris infinitely far in the past
As indicated, the PERIODS are computed with respect to the current time, or the --wrt value if specified, and they do not respect any calendar. So --keep-dailies-for 5d means a period starting exactly 5 * 24 * 60 * 60 seconds before the starting point. Math, but make it archive maintenance. ๐งฎ๐
๐ OPTIONS ๐
--keep-all-forPERIOD โ when no smaller time scale--keepoption applies, retain all saves within the given period. Everything. All of it. Keeping it. ๐ซถ--keep-dailies-forPERIOD โ when no smaller time scale--keepoption applies, retain the newest save for any day within the given period. One save per day, main character of that day only. ๐--keep-monthlies-forPERIOD โ when no smaller time scale--keepoption applies, retain the newest save for any month within the given period.--keep-yearlies-forPERIOD โ when no smaller time scale--keepoption applies, retain the newest save for any year within the given period.--wrtUTC_SECONDS โ when computing a keep period, place the most recent end of the range atUTC_SECONDS, and any saves newer than this will be kept. Setting the timeline's mood, fr. โฐ--pretendโ don't do anything, just list the actions that would be taken to standard output, one action per line like this:
- SAVE
+ SAVE
...
--gcโ garbage collect the repository after removing the relevant saves. This is the default behavior, but it can be avoided with--no-gc. ๐๏ธโจ--gc-thresholdN โ only rewrite a packfile if it's over N percent garbage; otherwise leave it alone. The default threshold is10%. Like, if it's not messy enough, we simply do not perceive it. ๐-#,--compress #โ set the compression level when rewriting archive data to#(a value from0-9, where9is the highest and0is no compression). The default is1(fast, loose compression).-v,--verboseโ increase verbosity (can be specified more than once). Say it louder for the people in the back. ๐ฃ
๐ NOTES ๐
When --verbose is specified, the save periods will be summarized to standard error with lines like this:
keeping monthlies since 1969-07-20-201800
keeping all yearlies
...
It's possible that the current implementation might not be able to format the date if, for example, it is far enough back in time. In that case, you will see something like this:
keeping yearlies since -30109891477 seconds before 1969-12-31-180000
...
Like, the date formatting just gives up and hands you a raw negative-second countdown. Not me crying over epoch math. ๐ญ
๐ EXAMPLES ๐
# Keep all saves for the past month, and any newer monthlies for
# the past year. Delete everything else.
$ bup prune-older --keep-all-for 1m --keep-monthlies-for 1y
# Keep all saves for the past 6 months and delete everything else,
# but only on the semester branch.
$ bup prune-older --keep-all-for 6m semester
See how she eats? ๐ฅ
๐ SEE ALSO ๐
bup-rm(1), bup-gc(1), and bup-fsck(1) โ the whole friend group, literally.
๐ซ BUP ๐ซ
Part of the bup(1) suite. One big happy family. ๐ซถ
๐ AUTHORS ๐
Rob Browning rlb@defaultvalue.org
that's the whole page bestie, brought to you by bup 0.34, dated 2026-09-01 โ go forth and prune responsibly, and remember: --pretend first, always. ๐
โจ๐
๐ฆ where this page comes from
- fedora 44: bup 0.34-1.fc44 ยท LGPL-2.0-only
- nixpkgs unstable: bup 0.34
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms