in order to manage my backend disk usage I decided to check how much space my attachments are taking and one thing seems to be lacking: where are those attachments being used?
I know for a fact that I can delete the first one. The second one probably not. What about the third and fourth? I know I can click and preview, but I'm lacking important context. Maybe #3 and #4 are from notes I don'd need, so instead of cherry-picking attachments I can delete the note and clear even more space?
Right now I'm on:
Joplin 2.0.11 (prod, linux)
Would it be possible to display another column naming notes where an attachment is used?
That way I could check the top 20-30 biggest files every once in a while and remove any trash.
Side note: the triangles used to sort are quite tiny. Would it be possible to make them larger?
As a workaround you can just search for the attachment id -- it will give you the referencing note.
I deleted the top #1 offender. File #2 I've found through search.
986214bd8d0843ec822fbdb05dfc6974 don't show in the
CTRL+P search. I couldn't find one of them earlier and assumed that this search does not account for attachments, despite knowing in the back of my head that it used to work.
I can see items
986214bd8d0843ec822fbdb05dfc6974 on the backend in the
.resource folder. Are those attachments orphans?
Maybe they are kept because they belong to a note that has been recently deleted but is still kept accoring to your note history settings.
Either this or they are orphans.
I'm also struggling a bit with this 'advanced tool'.. I understand no orphan attachments should exist from deletes notes if note history is off, but it would be nice to be able to have an option to search for possible ones anyway.
Often I remove references to attachments in notes without deleting the note itself and thought the only way to get rid of the unused resource was to manually search and delete it by means of their ID as I tend to change the title after insertation. For this I right-clicked the attachment in the viewer and choose 'Reveal file in folder' to check the file size. Then opening the Note attachments page, sort on size and find the correct one via its size due to not having the option to sort on ID. What happens if I delete the file directly from the .resource folder using the Windows file explorer instead of Joplin's Note attachments page? Will this corrupt the database?
Thinking about this now I just realized I could simply duplicate the note instead and then remove the reference to the attachment in the original note followed by deleting the duplicated note again, which should trigger the auto-deletion of the attachment if note history is off, right?
Anyway, I like @tangodelta's request, but if this would clutter the table too much I would suggest adding a column with the amount of notes using the attachment, so orphans can be identified thanks to a 'zero'.
You can try to use this small tool to check unused attachment resources
Thnx for your reply. I have no idea how to use this, but it looks very useful indeed. I'm a Windows desktop and Android user with no developer/server or terminal experience at all.. Do I need to install VScode and your joplin-vscode-plugin for this to work?
How to use
Desktop version of joplin
Open web clipper service
Fill in the configuration on the settings page
Then click check
Right, the feature from Joplin I didn't use so far, now it makes sense!
Last question I promise: How does this joplin-batch-web work in terms of privacy? Does this process all my data 'over the air' or does it work locally?
Work locally, there is no back-end service, if you are not at ease, you can check the source code: joplin-utils/apps/joplin-batch-web at master · rxliuli/joplin-utils · GitHub
In addition, I added an instruction and gif demo on the homepage
Understood, thanks! If I knew how to read code I would take a look, but
my understanding/ignorance depends on explanations from people like you.
And I don't know how I missed the instructions, sorry about that..
Thanks again for your prompt answers and great solution!
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.