# Any way to \`dedupe\` in skip mode, but force delete from one folder only?

**URL:** <https://forum.rclone.org/t/any-way-to-dedupe-in-skip-mode-but-force-delete-from-one-folder-only/5746>\
**Category:** Help and Support\
**Created:** [May 30, 2018, 11:55am UTC](https://forum.rclone.org/t/any-way-to-dedupe-in-skip-mode-but-force-delete-from-one-folder-only/5746 "2018-05-30T11:55:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZeroG](https://forum.rclone.org/user_avatar/forum.rclone.org/zerog/32/797_2.png) [@ZeroG](https://forum.rclone.org/u/ZeroG)\
**Post date:** [May 30, 2018, 11:55am UTC](https://forum.rclone.org/t/any-way-to-dedupe-in-skip-mode-but-force-delete-from-one-folder-only/5746/1 "2018-05-30T11:55:36Z")

</div>

Say I have 2 folders, where folder1 contains duplicates of items in folder2.

Is there any way to find the dupes and delete them but ONLY from folder1? I.e., don’t touch anything in folder2.

At the end, folder2 should be unchanged, and folder1 should no longer contain any items that are in folder2.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [May 30, 2018, 4:36pm UTC](https://forum.rclone.org/t/any-way-to-dedupe-in-skip-mode-but-force-delete-from-one-folder-only/5746/2 "2018-05-30T16:36:38Z")

</div>

Hmm, you could merge the two folders like this (untested)

```
rclone move --ignore-existing remote:folder1 remote:folder2

```

which should put unique stuff from folder1 into folder2 and the duplicates will remain in folder1.

(If you want to try that, try with `-vv --dry-run` first!)

Alternatively you could do something like this

```
rclone lsf --files-only -R remote:folder1 | sort > folder1-list
rclone lsf --files-only -R remote:folder2 | sort > folder2-list

sort folder1-list folder2-list | uniq -d > duplicate-list

```

You’ll then have a list of duplicate files in `duplicate-list`

Remove them from folder1 like this

```
rclone delete --dry-run --files-from duplicate-list remote:folder1
```

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [March 4, 2020, 12:45am UTC](https://forum.rclone.org/t/any-way-to-dedupe-in-skip-mode-but-force-delete-from-one-folder-only/5746/3 "2020-03-04T00:45:22Z")

</div>

Closed on March 4, 2020, 12:45am UTC


