Skip to content

How to delete everything in a archive except a folder #7204

Answered by ThomasWaldmann
blueray453 asked this question in Q&A
Discussion options

You must be logged in to vote

It's correct that archive content can not be modified after the archive is created.

But, it is possible to run borg recreate with patterns including only the stuff that shall remain and excluding everything else.
In that case, a new archive will be created (and the old one deleted, except if you use the option not to do that).

Using --list --dry-run or keeping the original archive is strongly recommended until you are pretty sure it only removed the stuff you wanted to remove.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@blueray453
Comment options

Answer selected by blueray453
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants