borg-delete(1)
β¨ borg-delete(1) β¨
okay bestie, we're doing the borg backup tool today and this one is borg-delete, which is literally the "get it out of my sight" command. deleting repos, deleting archives, deleting vibes. let's go π
πΈ NAME πΈ
borg-delete β delete an existing repository or archives
like, gone gone. no cap. π
π SYNOPSIS π
borg [common options] delete [options] [REPOSITORY_OR_ARCHIVE]
[ARCHIVE...]
π¦ DESCRIPTION π¦
This command deletes an archive from the repository, or the complete repository if you're feeling dramatic. Either way, it's giving demolition era.
IMPORTANT, FR FR: when you delete archives, the repository disk space is NOT freed until you run borg compact. not me finding out the hard way π the space is still there, just vibing, unusable. so go run compact after, okay?
When you delete a complete repository, the security info and the local cache for it (if any exist) get yeeted too. alternatively you can delete just the local cache with the --cache-only option, or keep the security info around with the --keep-security-info option. so many little switches, obsessed.
When in doubt (and bestie, you should be in doubt, this is a delete command), use --dry-run --list to see what would be deleted. that's your vibe check before you commit to anything. β¨
When you use --stats, you get some stats about how much data was deleted. the "Deleted data" deduplicated size is the most interesting one, because that's literally how much your repository will shrink. π please note that the "All archives" stats refer to the state after deletion β so, post-glow-up numbers. also --stats can be slow, so if you want something faster, use --quick-stats (it skips the repository-wide "All archives" statistics). heads up though: --stats / --quick-stats and --dry-run are mutually exclusive, you cannot have both, pick a lane queen π
You can delete multiple archives by specifying a shell pattern to match multiple archives using the --glob-archives GLOB option (for more info on these patterns, see borg_patterns). matching multiple things at once? slay. scary? also yes.
To avoid accidentally deleting archives (especially when you're out here using glob patterns, which is such a dangerous game), it might be helpful to use --dry-run to test out the command without actually making any changes to the repository. the way that --dry-run has your back π«Ά
π OPTIONS π
See borg-common(1) for common options of Borg commands. (those are the shared ones, we're just doing the delete-specific ones here)
π arguments π
REPOSITORY_OR_ARCHIVEβ the repository or the archive you want to deleteARCHIVEβ archives to delete (yep, plural, you can list more than one)
β options β
-n,--dry-runβ do not change repository. it's a pretend delete, a dress rehearsal, a "what if" π--listβ output verbose list of archives-s,--statsβ print statistics for the deleted archive--quick-statsβ print only deletion statistics, skipping repository-wide statistics. the fast version, for when you don't have all day--cache-onlyβ delete only the local cache for the given repository--forceβ force deletion of corrupted archives. use--force --forcein case--forcedoes not work. yes bestie, that's real, you double the force when one force isn't forcing π--keep-security-infoβ keep the local security info when deleting a repository--save-spaceβ work slower, but using less space. trading time for disk, the eternal bargain-c SECONDS,--checkpoint-interval SECONDSβ write checkpoint everySECONDSseconds (Default:1800)
π§ Archive filters π§
-P PREFIX,--prefix PREFIXβ only consider archive names starting with this prefix. (deprecated β so like, it's old, it's tired, use the glob instead π)-a GLOB,--glob-archives GLOBβ only consider archive names matching the glob.sh:rules apply (without actually using thesh:prefix), see"borg help patterns".--sort-by KEYSβ Comma-separated list of sorting keys; valid keys are:timestamp,archive,name,id; default is:timestamp--first Nβ consider firstNarchives after other filters were applied--last Nβ consider lastNarchives after other filters were applied
π₯ EXAMPLES π₯
# delete a single backup archive:
$ borg delete /path/to/repo::Monday
# actually free disk space:
$ borg compact /path/to/repo
# delete all archives whose names begin with the machine's hostname followed by "-"
$ borg delete --glob-archives '{hostname}-*' /path/to/repo
# delete all archives whose names contain "-2012-"
$ borg delete --glob-archives '*-2012-*' /path/to/repo
# see what would be deleted if delete were run without --dry-run
$ borg delete --list --dry-run -a '*-May-*' /path/to/repo
# delete the whole repository and the related local cache:
$ borg delete /path/to/repo
You requested to completely DELETE the repository *including* all archives it contains:
repo Mon, 2016-02-15 19:26:54
root-2016-02-15 Mon, 2016-02-15 19:36:29
newname Mon, 2016-02-15 19:50:19
Type 'YES' if you understand this and want to continue: YES
see that last one? it literally makes you type YES in all caps. it's asking you to mean it. main character energy, honestly π
π SEE ALSO π
borg-common(1), borg-compact(1)
(run the compact one after, for real, your disk space is waiting bestie)
π Author π
The Borg Collective
<div align="center">β¨ that's the whole page, no notes β¨</div>
okay so this was from the borg backup tool, dated 2026-07-18, and it's borg-delete(1) β go forth and delete responsibly, queen π«ΆππΈ
π¦ where this page comes from
- alpine 3.24: borgbackup-doc 1.4.5-r0 Β· BSD-3-Clause
- arch rolling: borg 1.4.5-1 Β· BSD
- ubuntu stonking: borgbackup 1.4.5-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms