Atlas Creative2 downloadsFind attachments that no note or canvas uses, see how much space they take, and move the ones you pick to trash or an archive folder. Also merges duplicate files, with undo.
Vaults collect images, PDFs and recordings that no note uses any more: a screenshot you replaced, a PDF from a note you deleted, a pasted image you never kept. They also collect the same image saved twice under different names. This plugin finds both, shows you every file and its size, and only changes what you pick, after you confirm.
[[file.pdf]], ![[image.png|300]]), markdown links and images (, [doc](<my file.pdf>), relative paths like ../img/a.png), HTML tags (<img src="...">, <embed>, <a href="...">), links in frontmatter and plain paths there such as a cover or banner property, and canvas file cards, group backgrounds and links in text cards. Note text is read directly too, so links inside code blocks and in Excalidraw drawings' embedded files count.Notes (.md), canvases (.canvas), bases (.base) and Excalidraw drawings are never listed as attachments. The archive folder is never scanned.
To see the list without changing anything, run Attachment Sweeper: Write unused attachments report (dry run).
To merge duplicates, run Attachment Sweeper: Find duplicate attachments, turn on the sets you want to merge, pick the copy to keep, then press Merge and confirm. Run Attachment Sweeper: Undo last duplicate merge to put everything back. Undo leaves alone any note you edited after the merge.
Archive/Unused attachments.Everything runs locally. The plugin makes no network requests.
Copy main.js, manifest.json and styles.css into <your vault>/.obsidian/plugins/attachment-sweeper/, then enable the plugin in Settings → Community plugins.
npm install
npm test # unit tests for link detection, the scan, the report, trash and archive, and duplicate merges with undo
npm run lint # ESLint with eslint-plugin-obsidianmd
npm run build # type-check and build main.js
Publishing a GitHub release tagged with the version in manifest.json (for example 1.0.0) runs the Release workflow. It lints, tests and builds the plugin, attests build provenance for main.js, and attaches main.js, manifest.json and styles.css to the release.
If this plugin saves you time, you can sponsor me on GitHub.
0BSD