# Is automatic resources clean up realized?

**URL:** <https://discourse.joplinapp.org/t/is-automatic-resources-clean-up-realized/41319>\
**Category:** Support\
**Created:** [11 October 2024 05:48 UTC](https://discourse.joplinapp.org/t/is-automatic-resources-clean-up-realized/41319 "2024-10-11T05:48:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ansami](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/ansami/32/9886_2.png) [@Ansami](https://discourse.joplinapp.org/u/Ansami)\
**Post date:** [11 October 2024 05:48 UTC](https://discourse.joplinapp.org/t/is-automatic-resources-clean-up-realized/41319/1 "2024-10-11T05:48:56Z")

</div>

### Operating system

Windows

### Joplin version

2.14.22

### Desktop version info

Joplin 2.14.22 (prod, win32)

Client ID: e9577071c4b649e8bc2dc6a2733d7a07  
Sync Version: 3  
Profile Version: 46  
Keychain Supported: Yes

Revision: e579eb9

Backup: 1.4.1  
Templates: 2.1.0

### Sync target

File system

### Editor

Markdown Editor

### What issue do you have?

referenced to this topic: [No longer used resources not deleted · Issue #154 · laurent22/joplin · GitHub](https://github.com/laurent22/joplin/issues/154#issuecomment-356582366)  
The automatic resources clean up has been mentioned since 2018. But I also saw some suggestions about using scripts to clean up redundency resources.  
So, i am wandering:

1. was automatic resources clean up realized officially (in app or plugins)?
2. if it was realized, how can i find out it is changed in which version or which commit (i searched from the "what's new" page but not really useful).

---

<div class="post-metadata">

**Author:** ![personalizedrefriger](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/personalizedrefriger/32/13210_2.png) [@personalizedrefriger](https://discourse.joplinapp.org/u/personalizedrefriger)\
**Post date:** [11 October 2024 17:46 UTC](https://discourse.joplinapp.org/t/is-automatic-resources-clean-up-realized/41319/2 "2024-10-11T17:46:19Z")

</div>

See

> [@Do attachments (pictures) unattached to any note get deleted, if Note History is disabled?](https://discourse.joplinapp.org/t/do-attachments-pictures-unattached-to-any-note-get-deleted-if-note-history-is-disabled/35308/3):
>
> > **From local testing, resources do seem to be automatically deleted when note history is disabled (though as per \<a class="mention" href="/u/harsel"\>@HarSel\</a\>'s comment perhaps there's a bug that causes them not to be deleted in some cases). 
> The amount of time they're kept still seems to be based on the Keep note history for (days) setting (even when note history is off).**
> >
> > Summary of testing: Started Joplin 2.14.9 (dev mode) Created a note Attached an…

To summarize:

- The `Keep note history for (days)` setting should determine how long it takes for attachments not linked to any note to be removed.
- Just before resources are deleted, a line starting with `ResourceService::deleteOrphanResources:` should be added to Joplin's `log.txt`, describing which resources are being removed.
- I think automatic resource deletion was [added in this commit](https://github.com/laurent22/joplin/commit/c1bb51c12b4cc3462d8593fb92f27179b434fdeb).

---

<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:** [10 November 2024 17:46 UTC](https://discourse.joplinapp.org/t/is-automatic-resources-clean-up-realized/41319/3 "2024-11-10T17:46:56Z")

</div>

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