Any recommended methodology to delete an org-roam file?

Is there any reason why I shouldn’t just delete an org-roam file? Any risk to database/links etc, is what I’m thinking about. (Sorry if this is too trivial).

1 Like

Right now, deleting a file will result in links to the current file breaking.

If you delete the file using Emacs (with dired, or calling M-x delete-file), the cache remains consistent. If you delete the file from outside Emacs, it won’t, but is not a big issue, because running M-x org-roam-db-build-cache once more will bring it to a consistent state.


Thank you, that’s very helpful.

I use crux-delete-file-and-buffer
to delete the file of the current buffer.
That’s a few steps less then delete-file
and the cache seems to be updated the same. It probably calls delete-file anyway.

Any updates on the best way to delete a file?