borgbackup/docs/man/borg-delete.1

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

131 lines
3.5 KiB
Groff
Raw Normal View History

2026-03-15 09:34:31 -04:00
.\" Man page generated from reStructuredText
.\" by the Docutils 0.22.4 manpage writer.
2017-02-05 08:22:06 -05:00
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
2026-06-16 08:17:43 -04:00
.TH "borg-delete" "1" "2026-06-16" "" "borg backup tool"
2026-03-15 09:34:31 -04:00
.SH Name
2025-12-23 12:00:09 -05:00
borg-delete \- Deletes archives.
2017-02-05 08:22:06 -05:00
.SH SYNOPSIS
.sp
2024-09-26 01:57:01 -04:00
borg [common options] delete [options] [NAME]
2017-02-05 08:22:06 -05:00
.SH DESCRIPTION
.sp
2024-11-16 14:14:16 -05:00
This command soft\-deletes archives from the repository.
2018-07-12 16:00:19 -04:00
.sp
2024-11-16 14:14:16 -05:00
Important:
.INDENT 0.0
.IP \(bu 2
The delete command will only mark archives for deletion (\(dqsoft\-deletion\(dq),
repository disk space is \fBnot\fP freed until you run \fBborg compact\fP\&.
.IP \(bu 2
You can use \fBborg undelete\fP to undelete archives, but only until
2018-07-12 16:00:19 -04:00
you run \fBborg compact\fP\&.
2024-11-16 14:14:16 -05:00
.UNINDENT
2018-07-12 16:00:19 -04:00
.sp
2021-02-05 19:32:54 -05:00
When in doubt, use \fB\-\-dry\-run \-\-list\fP to see what would be deleted.
.sp
2025-12-23 12:00:09 -05:00
You can delete multiple archives by specifying a match pattern using
the \fB\-\-match\-archives PATTERN\fP option (for more information on these
patterns, see \fIborg_patterns\fP).
2017-02-05 08:22:06 -05:00
.SH OPTIONS
.sp
See \fIborg\-common(1)\fP for common options of Borg commands.
2024-09-26 01:57:01 -04:00
.SS arguments
.INDENT 0.0
.TP
.B NAME
specify the archive name
.UNINDENT
2025-04-21 15:07:46 -04:00
.SS options
2017-02-05 08:22:06 -05:00
.INDENT 0.0
.TP
2022-06-23 19:19:19 -04:00
.B \-n\fP,\fB \-\-dry\-run
2025-12-23 12:00:09 -05:00
do not change the repository
2018-07-12 16:00:19 -04:00
.TP
2022-06-23 19:19:19 -04:00
.B \-\-list
2025-12-23 12:00:09 -05:00
output a verbose list of archives
2017-02-05 08:22:06 -05:00
.UNINDENT
.SS Archive filters
2017-02-05 08:22:06 -05:00
.INDENT 0.0
.TP
2022-10-02 09:51:17 -04:00
.BI \-a \ PATTERN\fR,\fB \ \-\-match\-archives \ PATTERN
2025-12-23 12:00:09 -05:00
only consider archives matching all patterns. See \(dqborg help match\-archives\(dq.
2017-02-05 08:22:06 -05:00
.TP
.BI \-\-sort\-by \ KEYS
2024-10-03 06:23:03 -04:00
Comma\-separated list of sorting keys; valid keys are: timestamp, archive, name, id, tags, host, user; default is: timestamp
2017-02-05 08:22:06 -05:00
.TP
.BI \-\-first \ N
2025-12-23 12:00:09 -05:00
consider the first N archives after other filters are applied
2017-02-05 08:22:06 -05:00
.TP
.BI \-\-last \ N
2025-12-23 12:00:09 -05:00
consider the last N archives after other filters are applied
2023-02-26 15:30:54 -05:00
.TP
.BI \-\-oldest \ TIMESPAN
2025-12-23 12:00:09 -05:00
consider archives between the oldest archive\(aqs timestamp and (oldest + TIMESPAN), e.g., 7d or 12m.
2023-02-26 15:30:54 -05:00
.TP
.BI \-\-newest \ TIMESPAN
2025-12-23 12:00:09 -05:00
consider archives between the newest archive\(aqs timestamp and (newest \- TIMESPAN), e.g., 7d or 12m.
2023-02-26 15:30:54 -05:00
.TP
.BI \-\-older \ TIMESPAN
2025-12-23 12:00:09 -05:00
consider archives older than (now \- TIMESPAN), e.g., 7d or 12m.
2023-02-26 15:30:54 -05:00
.TP
.BI \-\-newer \ TIMESPAN
2025-12-23 12:00:09 -05:00
consider archives newer than (now \- TIMESPAN), e.g., 7d or 12m.
2017-02-05 08:22:06 -05:00
.UNINDENT
.SH EXAMPLES
.INDENT 0.0
.INDENT 3.5
.sp
2025-04-21 15:07:46 -04:00
.EX
2025-12-23 12:00:09 -05:00
# Delete all backup archives named \(dqkenny\-files\(dq:
2024-09-26 01:57:01 -04:00
$ borg delete \-a kenny\-files
2025-12-23 12:00:09 -05:00
# Actually free disk space:
2022-06-23 19:19:19 -04:00
$ borg compact
2018-07-12 16:00:19 -04:00
2025-12-23 12:00:09 -05:00
# Delete a specific backup archive using its unique archive ID prefix
2024-09-26 01:57:01 -04:00
$ borg delete aid:d34db33f
2025-12-23 12:00:09 -05:00
# Delete all archives whose names begin with the machine\(aqs hostname followed by \(dq\-\(dq
2023-06-11 17:10:23 -04:00
$ borg delete \-a \(aqsh:{hostname}\-*\(aq
2018-07-12 16:00:19 -04:00
2025-12-23 12:00:09 -05:00
# Delete all archives whose names contain \(dq\-2012\-\(dq
2023-06-11 17:10:23 -04:00
$ borg delete \-a \(aqsh:*\-2012\-*\(aq
2018-07-12 16:00:19 -04:00
2025-12-23 12:00:09 -05:00
# See what would be deleted if delete was run without \-\-dry\-run
2023-06-11 17:10:23 -04:00
$ borg delete \-\-list \-\-dry\-run \-a \(aqsh:*\-May\-*\(aq
2025-04-21 15:07:46 -04:00
.EE
2017-02-05 08:22:06 -05:00
.UNINDENT
.UNINDENT
.SH SEE ALSO
.sp
2024-09-08 11:52:10 -04:00
\fIborg\-common(1)\fP, \fIborg\-compact(1)\fP, \fIborg\-repo\-delete(1)\fP
2026-03-15 09:34:31 -04:00
.SH Author
2017-02-05 08:22:06 -05:00
The Borg Collective
2026-03-15 09:34:31 -04:00
.\" End of generated man page.