Hi everyone! Has this just been dropped suddenly? Or is it implemented and I have not found it? I am only starting with Obsidian now, but can already tell that my attachments folder will be a huge mess if this is not available. Specifically when dragging a lot of screenshots into the notes, that usually do not have names suggesting their content.
This is an open feature request.
Above, youāll see a workaround using a plugin. (I havenāt tested it personally.) Remove unused attachments - #7 by Vinadon
Iāll check on the suggested plugins after I made progress on post import cleanup from Evernote.
My attachments folder currently has over 18k files in it. After I remove notes that whose only content was an attachment (think, pdf document) , Iāll run a plugin and see how many it cleans up.
This feature works be a great core feature imho. Maintaining a file reference count and deleting the file when the count hits 0 isnāt a small task, though.
Perhaps itās better to move those files in a folder āattachments_not_in_useā instead of more or less blindly delete them.
A temp location could be handy in case you restore a note that you deleted by accident. or we can say that the used is responsible for restoring it from the ātrashā folder or from backup.
ie
User deletes last note that references an attachment.
Obsidian deletes attachment
User restores note
attachment link is now broken.
Totally agree with the need of an āautomatic removalā of attachments after a note was deleted. It is painful to do this manually and really a bummer when using the app with attachments. Please add something that takes care of this.
If you read the thread, there are plugins that do this.
I use this plugins called nuke orphans btw