# Clearing the repository after deleting a snapshot?

**URL:** <https://kopia.discourse.group/t/clearing-the-repository-after-deleting-a-snapshot/575>\
**Category:** Support\
**Created:** [August 6, 2021, 10:29am UTC](https://kopia.discourse.group/t/clearing-the-repository-after-deleting-a-snapshot/575 "2021-08-06T10:29:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/simon/32/194_2.png) [@Simon](https://kopia.discourse.group/u/Simon)\
**Post date:** [August 6, 2021, 10:29am UTC](https://kopia.discourse.group/t/clearing-the-repository-after-deleting-a-snapshot/575/1 "2021-08-06T10:29:14Z")

</div>

Hi guys.Please tell me I cannot understand Faced the problem of clearing the repository after deleting a snapshot

> #kopia repo create filesystem --path /tmp/tst  
> Enter password to create new repository:  
> Re-enter password for verification:  
> Initializing repository with:  
> block hash: BLAKE2B-256-128  
> encryption: AES256-GCM-HMAC-SHA256  
> splitter: DYNAMIC-4M-BUZHASH  
> Connected to repository.

it`s good  
next

> #kopia snap create ~/workspace/  
> Snapshotting simon@deb:/home/simon/workspace …
> 
> - 0 hashing, 496 hashed (1.1 GB), 0 cached (0 B), uploaded 1.1 GB, estimating…  
> Created snapshot with root k7266d5af73003579e275cd6a2700cbb6 and ID 8bf82c5370fb5c5c7f37cd47f42faaf7 in 8s  
> Running full maintenance…  
> Looking for active contents…  
> Processed 0 contents, discovered 1…  
> Looking for unreferenced contents…  
> Not enough time has passed since previous successful Snapshot GC. Will try again next time.  
> Rewriting contents from short packs…  
> Skipping blob deletion because not enough time has passed yet (59m59s left).  
> Finished full maintenance.

> #kopia snap list  
> simon@deb:/home/simon/workspace  
> 2021-08-06 13:19:06 MSK k7266d5af73003579e275cd6a2700cbb6 1.1 GB drwxr-xr-x files:495 dirs:74 (latest-1,annual-1,monthly-1,weekly-1,daily-1,hourly-1

> #llc /tmp/tst  
> n2d p08 p13 p34 p41 p48 p5a p68 p7a p88 pb7 pbf pcc pe1 pf7 qaf sb8  
> n89 p11 p19 p35 p43 p50 p62 p74 p7d pa1 pb9 pc2 pce pe7 pf9 qd7 kopia.maintenance.f  
> p05 p12 p30 p40 p44 p52 p63 p78 p84 pb0 pbc pca pd0 peb pfd sa9 kopia.repository.f

it`s ok  
next

> #kopia snap delete k7266d5af73003579e275cd6a2700cbb6 --delete  
> Deleting snapshot 8bf82c5370fb5c5c7f37cd47f42faaf7 of simon@deb:/home/simon/workspace at 2021-08-06 13:19:06 MSK…

> #kopia snap list

> #llc /tmp/tst  
> n01 p05 p12 p30 p40 p44 p52 p63 p78 p84 pb0 pbc pca pd0 peb pfd qd7 sb8  
> n2d p08 p13 p34 p41 p48 p5a p68 p7a p88 pb7 pbf pcc pe1 pf7 q76 s3b kopia.maintenance.f  
> n89 p11 p19 p35 p43 p50 p62 p74 p7d pa1 pb9 pc2 pce pe7 pf9 qaf sa9 kopia.repository.f

all files remained in the repository. How should they be removed?  
Thank

---

<div class="post-metadata">

**Author:** ![jkowalski](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/jkowalski/32/3_2.png) [@jkowalski](https://kopia.discourse.group/u/jkowalski)\
**Post date:** [August 6, 2021, 2:12pm UTC](https://kopia.discourse.group/t/clearing-the-repository-after-deleting-a-snapshot/575/2 "2021-08-06T14:12:29Z")

</div>

You need to let some time pass (currently \>24h) and run maintenance again - this is done for safety reasons to ensure other kopia clients running in parallel won’t rely on cached data you’re deleting.

Alternatively you can pass `--safety=none` to disable the wait, but you must guarantee that no Kopia is running while you do it.

---

<div class="post-metadata">

**Author:** ![Simon](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/simon/32/194_2.png) [@Simon](https://kopia.discourse.group/u/Simon)\
**Post date:** [August 6, 2021, 7:07pm UTC](https://kopia.discourse.group/t/clearing-the-repository-after-deleting-a-snapshot/575/4 "2021-08-06T19:07:52Z")

</div>

I did as you said, it’s okay. Before that, after 24 hours, it was not deleted  
Thanks a lot !

---

<div class="post-metadata">

**Author:** ![kees](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kees/32/266_2.png) [@kees](https://kopia.discourse.group/u/kees)\
**Post date:** [January 4, 2022, 1:25pm UTC](https://kopia.discourse.group/t/clearing-the-repository-after-deleting-a-snapshot/575/5 "2022-01-04T13:25:11Z")

</div>

@jkowalski was this option removed in 0.9.8 or earlier? I get an error  
I also do not see this option when trying: `kopia snap delete --help`

```auto
$ kopia snap delete --delete --safety=none k627d1c06670e8d32b50b2bc1ce8d8098
kopia: error: unknown long flag '--safety', try --help

```
