Note attachments manager

After using Joplin for several days , I find that all the attachments my notes are using, are located in folder "C:\Users\(username)\.config\joplin-desktop\resources" ; they are also listed in this particular tool ("Tools --> note attachments") .
When I try delete one of my notebooks, the attachments of the deleted notebook ARE STILL in folder "C:\Users\(username)\.config\joplin-desktop\resources" ,and they still listed in "Tools --> note attachments" .
I suggest this tool("Tools --> note attachments" .) would be able to mark all the attachments that are NOT linked to my notebooks, so we can delete them. If not,the size of that attachments folder will be larger and larger...


I support your suggestion. That would be an important function for me too.

Do you have the note history still set? I'm wondering if the resources still persist until the history has been purged? i.e. if you disable tools->options->note history, will it delete the old resources? Obviously that has wider consequences for the history of everything else in your notebooks.

Otherwise if you open the sqlite database it seems that the note->resource association is held in table 'note_resources' so in theory you could run a query like the following to get a list of any 'orphaned' files then manually find the entries in the Note Attachments tool and hit the delete button.

SELECT id, title 
FROM resources
WHERE id IN(SELECT resource_id 
            FROM note_resources
            WHERE is_associated = 0)
ORDER BY title asc;

You could even check for a size limit on resources.size if you only want to purge items over a certain size limit.
I can't say I would recommend deleting them straight out of the resources folder or the db, that would be asking for trouble.

EDIT - Just to add, I'm not recommending you do any of this to your live data without checking and re-checking, I'm not involved with the development of this application so this is all just educated guesswork.

1 Like

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