borg repo-delete

borg [common options] repo-delete [options]

options

-n, --dry-run

do not change the repository

--list

output a verbose list of archives

--force

do not ask for confirmation, just delete the repository. this also works if the repository is damaged to a point where its archives can not be listed anymore.

--cache-only

delete only the local cache for the given repository

--keep-security-info

keep the local security info when deleting a repository

Common options

Description

This command deletes a complete repository.

When you delete a complete repository, the security info and local cache for it (if any) are also deleted. Alternatively, you can delete just the local cache with the --cache-only option, or keep the security info with the --keep-security-info option.

--force also destroys a store that has no repository config, provided it looks like a borg store (it has the packs, archives, index and config namespaces).

Deleting a repository needs its key, as locking it needs the key. If the key is lost, the repository is useless and has to be deleted with the storage’s own tools.

Always first use --dry-run --list to see what would be deleted.

Examples

# delete the whole repository and the related local cache:
$ borg repo-delete
You requested to DELETE the following repository completely *including* 2 archives it contains:
------------------------------------------------------------------------------
Repository ID: e7046adda9b2a76bb4fac8d707ab7dc12a836391c8c3612cc12d461e713c5bc1
Location: /path/to/repo
------------------------------------------------------------------------------
Type 'YES' if you understand this and want to continue: YES