This topic is particularly useful for those situations in which:
one comes to obsidian from another platform
one makes a mistake when clearing up attachments or attaching them
Operationally I would imagine a process that:
a. Allow the use to select a folder to be processed
b. The process would ennumerate each file in the selected folder and remove those that are referened int he vault.
c. Show the user the list of orphaned files and allow them to check those they want to remove.
I tested some of the mentioned plugins - some of them only take into account wikilinks ([[]]), and do not take into account markdown links ([]()), others do not take into account links located in .canvas files, not .md.
This is in addition to some strange settings, where disabling the work of exceptions, I have the plugin stops performing its function in principle.
I would like a native implementation of this feature, - more stable and reliable, covering all possible scenarios of using media files, and which can be trusted. Perhaps implemented in such a way that I can actually make sure that all the files Iām about to delete are not being used by me anywhere. I have no idea how this feature could be implemented in such a way that I can be sure that all the files I plan to delete are really not used anywhere, because even if all the files are listed in a table format with āfileā and ābacklinksā columns, and there are no links in the ābacklinksā column, how can I be sure that the native implementation of this feature has really accounted for all possible usage scenarios? Only by verifying the reliability of this feature through my own experience, I suppose, and āblindly trustingā. Only, unfortunately, through experience I can also be convinced otherwise, and lose the files I need (which has happened in the past with one of the plugins mentioned in this thread. Fortunately, there was a relatively fresh backup).
Any progress on this from the developers?
From myself I will add: it is important to create a delete delay (since I can move the attachment to another place via cut). Delay for example from 5 minutes to several days. I understand that technically this is not the most trivial task as optimization is required. But I think deleting attachments may be part of indexing - in any case not all files were edited after the last indexing, etc.
External solutions are not satisfactory, e.g. a post written 18 days ago on Reddit:
Update 2025 - just tried using this and it deleted images attached to some of my notes. I uninstalled this plugin.
Keep good backups (not a sync tool). And also take a version snapshot with a tool like git. Or make a duplicate test vault. Then you donāt need someoneās reputation; you can just test and see.
I wouldnāt use any plugin that deletes stuff without backing up first. And with git, you can review what changed, or fix a mistake (user or plugin).
I would like to add to this Feature Request a request to identify similar images and replace them with a single selected image, followed by the deletion of unnecessary images.
This will also help optimize the media files used ā sometimes the same image is used several times in different notes, and due to the lack of convenient media file management in Obsidian, this image is attached as a new one, resulting in the same image being used several times in the context of a single vault.
Currently, Duplicate Cleaner is a solution, but it is not connected with Obsidian and can only identify and suggest deleting duplicate images, but not automatically replace links in files.
I understand that Obsidian is not software for detecting and subsequently cleaning duplicate files, but this is what is missing.
Perhaps it would be more appropriate to implement such functionality in the form of a ābridgeā between software for detecting and cleaning duplicate files and Obsidian itself. Perhaps by the community, rather than the core developers.
Obsidian October encourages users to keep their vault clean, but there are no tools to do so.
This applies to both keeping media files and properties clean ā Show existing values in Properties view .
I love the new feature in v1.12 that prompts you to delete unused attachments when you are deleting a note. This solves a lot of problems with attachment management. The one problem it currently doesnāt solve (as far as I can tell) is the following: if you remove the reference / link to an attachment from a note (not delete a note), the orphan attachment still remains in your vault.
Proposed solution
Provide a prompt to delete an unused attachment when you delete a reference to it from a note, similar to the new prompt shown when deleting a note.
Current workaround
They exist but are either tedious, e.g. having a base query to find orphan files and deleting them manually, or require a community plugin (for a feature that should be built into Obsidian, and I suspect the developers agree based on the inclusion of the new feature in v1.12).
Related feature requests
There are several feature requests related to orphan attachment management, but none yet that place this feature request in light of the new developments in v1.12.