Recursive Note Deleter
pendingby Felix Queisler
When run in an open note this plugin will recursively find all linked notes from that note, all following notes, including attachments. Then it will list them and delete them after prompting you.
Obsidian Recursive Note Deleter Plugin
Recursively go through Obsidian notes and linked notes/attachments of those notes to delete them all. THIS PLUGIN IS PURPOSEFULLY HIGHLY DESTRUCTIVE. I created this plugin to deal with stray trees of notes which came from old Notion database imports. This plugin is based on the obsidian sample plugin code and was adjusted to the desired functionality.
In the settings you have many options to further specify deletion behaviour. This plugins default behaviour asks before deleting notes. However, i advise you to backup your vault before using this plugin.
A 💀 ribbon icon is added which will open the dialog in which you can check what files would be removed if you proceed. (provided you didn't disable confirm deletion in the settings)
Features
- Delete notes linked in the active note
- Delete notes linked in the active note and recursively delete all further linked notes to an unlimited depth
- Delete only linked attachments
- Delete only linked notes
- Delete linked notes and attachments
- Fully remove single line note links
- Fully remove single line note links in a list stile (completely removes list item)
- Remove inline links
- Remove backlinks (not fully tested)
- Backlinks: Remove inline links but keep note name in body text
- Backlinks: Remove inline link and replace with Placeholder
- Backup notes before deletion to a folder of choice
Usage
- Enable the plugin
- Change settings of the plugin to your desired behaviour in the settings pane
- A skull ribbon icon appears on the left side
- Open the note from which you want to initiate the nuclear blast
- Click the skull, a dialog will appear in which you can see what notes and attachments will get deleted (IF YOU DIDN'T DISABLE CONFIRM DELETION)
- Proceed on your own risk
Manually installing the plugin
- Copy over
main.js(generate it with npm run dev),styles.css, andmanifest.jsonto your vaultVaultFolder/.obsidian/plugins/your-plugin-id/.
API Documentation
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.