borg prune --keep-daily=7 --keep-weekly=4 user@remote:/backup/borg-repo

Category: Self-Hosting

borg prune --keep-daily=7 --keep-weekly=4 user@remote:/backup/borg-repo

Delete old Borg backups according to a retention policy — keep 7 daily and 4 weekly snapshots

Deletes old snapshots according to a retention policy. This example keeps 7 daily and 4 weekly backups and removes everything else.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.