Recently testing Obsidian and came here for this. Couple of thoughts:
- For removing previously orphaned files, I think the plugin is fine.
- Upon note deletion, removal of orphaned attachments should absolutely be core functionality.
Recently testing Obsidian and came here for this. Couple of thoughts:
Fully agree with everyone that believes removal of attachments should be done automatically upon deleting the note its attached too.
I’d also wish to have such a feature.
It would be really usefull, when there’s a popup window when deleting a note, so one can decide whether to delete the attachment, too.
Please add this feature.
The feature is a must.
Useful idea
Yes this needs to be implemented
Huh. I thought that dataview couldn’t list pages that were not Markdown: List other filetypes in vault · Issue #234 · blacksmithgu/obsidian-dataview · GitHub
So how can f.name.endsWith("excalidraw")
this ever work? Or maybe this somehow works for *.excalidraw
but not *.pdf
?
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
这个扩展非常棒
This extension is great!
I would like that if I delete a note, I would be asked what to do with the documents linked in it, if they have no other references, whether to keep them or delete them.
When I delete a note I would like that if there are linked media that are only in that note, I would be asked whether to keep them or delete them
All files remain