# Mass delete note attachements

**URL:** <https://discourse.joplinapp.org/t/mass-delete-note-attachements/27262>\
**Category:** Support\
**Created:** [8 September 2022 11:50 UTC](https://discourse.joplinapp.org/t/mass-delete-note-attachements/27262 "2022-09-08T11:50:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cleterrier](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/cleterrier/32/12212_2.png) [@cleterrier](https://discourse.joplinapp.org/u/cleterrier)\
**Post date:** [8 September 2022 11:50 UTC](https://discourse.joplinapp.org/t/mass-delete-note-attachements/27262/1 "2022-09-08T11:50:58Z")

</div>

Hi, this is about Joplin server with 2.6 client.

Is there a way to delete all note attachements at once form the client? I see Tools \> Note Attachements dialog can only delete them one by one.

I have deleted a large notebook that had all the notes in the client (also shut down note history), but there are lots (hundreds) of attachement files (resources) remaining on the server that get re-downloaded locally every time I sync, despite the account having now zero notes (it happens even if I delete all the files in the local joplin-desktop/resources folder) . I'm trying to get rid of these ghost files but I can only do so one by one in the Note Attachement dialog in the client, then sync. Is there a better way? Can I wipe user data server-side in some more efficient way?

---

<div class="post-metadata">

**Author:** ![Angel\_Crawford\_ftw](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/angel_crawford_ftw/32/19867_2.png) [@Angel\_Crawford\_ftw](https://discourse.joplinapp.org/u/Angel_Crawford_ftw)\
**Post date:** [8 September 2022 13:54 UTC](https://discourse.joplinapp.org/t/mass-delete-note-attachements/27262/3 "2022-09-08T13:54:22Z")

</div>

Oh, sorry. You want to get rid of the files on remote? Perhaps this could be of help for you?  
Go to "Tools" 🡒 "Options" 🡒 "Synchronisation" and open "Show Advanced Settings"

![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/1/1c0bf741deec8e6d318b126315519d6428e63a58.png)

---

<div class="post-metadata">

**Author:** ![cleterrier](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/cleterrier/32/12212_2.png) [@cleterrier](https://discourse.joplinapp.org/u/cleterrier)\
**Post date:** [8 September 2022 14:56 UTC](https://discourse.joplinapp.org/t/mass-delete-note-attachements/27262/4 "2022-09-08T14:56:03Z")

</div>

Sadly, the "re-upload local data to sync target" does _not_ clear the existing data on the sync target

---

<div class="post-metadata">

**Author:** ![MrKanister](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/mrkanister/32/20054_2.png) [@MrKanister](https://discourse.joplinapp.org/u/MrKanister)\
**Post date:** [8 September 2022 20:18 UTC](https://discourse.joplinapp.org/t/mass-delete-note-attachements/27262/5 "2022-09-08T20:18:08Z")

</div>

Which sync target are you using?

---

<div class="post-metadata">

**Author:** ![cleterrier](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/cleterrier/32/12212_2.png) [@cleterrier](https://discourse.joplinapp.org/u/cleterrier)\
**Post date:** [8 September 2022 20:20 UTC](https://discourse.joplinapp.org/t/mass-delete-note-attachements/27262/6 "2022-09-08T20:20:22Z")

</div>

I use Joplin Server 2.7.4 on a Synology NAS

---

<div class="post-metadata">

**Author:** ![MrKanister](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/mrkanister/32/20054_2.png) [@MrKanister](https://discourse.joplinapp.org/u/MrKanister)\
**Post date:** [8 September 2022 20:30 UTC](https://discourse.joplinapp.org/t/mass-delete-note-attachements/27262/7 "2022-09-08T20:30:00Z")

</div>

Maybe this script could help you?

> [@Scripts to remove orphaned resources](https://discourse.joplinapp.org/t/scripts-to-remove-orphaned-resources/2853):
>
> Please note that these scripts will become obsolete in the future, when the resource bugs are fixed! A word of caution: I use the scripts myself and haven’t experienced any issues. However, use them at your own risk! It’s always a good idea to create a backup first. There’s also the --dry-run or -n option to see what happens without actually doing anything. Use at your own risk! Why are there 2 scripts to remove resources? The first script jnrmor removes orphaned resources from the database a…

Another way would be to clear the server database and reupload everything cleanly. Do you have only one syncing user account on your server?

---

<div class="post-metadata">

**Author:** ![cleterrier](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/cleterrier/32/12212_2.png) [@cleterrier](https://discourse.joplinapp.org/u/cleterrier)\
**Post date:** [8 September 2022 20:33 UTC](https://discourse.joplinapp.org/t/mass-delete-note-attachements/27262/8 "2022-09-08T20:33:41Z")

</div>

Could be useful, thanks!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/1/c/1c948e33314e232a0927789508474d8624f4270b.png) [@system](https://discourse.joplinapp.org/u/system)\
**Post date:** [8 October 2022 20:34 UTC](https://discourse.joplinapp.org/t/mass-delete-note-attachements/27262/9 "2022-10-08T20:34:38Z")

</div>

Closed on 8 October 2022 20:34 UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
