The opinionated page remover for Logseq.
Every day I delete multiple pages in Logseq DB. First, I create pages, tags, or properties to test some ideas. Then I have to clean things up.
There are three annoying things about deleting pages:
- I have to use my mouse and click through multiple UI menus.
- After deleting the current page, Logseq jumps to the journal/home page — while I usually prefer to return to the previous page.
- If a page was created from another block with
[[syntax]], removing the page won't remove that block — it becomes an orphan, a regular text node.
This plugin adds a /delete this page command that solves exactly these issues:
- Deletes the current page.
- Jumps to the previous page.
- Removes all blocks referencing the removed page, if they contain no other data besides the reference.
Pages are deleted without asking for confirmation. If user accidentally deletes a page, ⌘+z will restore it. Nevertheless, it is easy to lose data with Slasher, so please make regular backups.
The plugin works with Logseq DB (0.11.x) and MD (0.10.x).
demo.mov
- Turn on Logseq developer mode in Settings -> Advanced
- Download the slasher-plugin.zip from the Releases page
- Unzip the file and load the unzipped folder from Logseq plugins page
If you also struggle with deleting pages, but do not want to install another plugin, or just do not like my approach, try this query:
{:query [:find (pull ?page [:block/name :block/tags])
:in $ ?start
:where
(or-join [?tag]
[?tag :block/name "page"]
[?tag :block/name "property"]
[?tag :block/name "tag"]
)
[?page :block/tags ?tag]
[?page :block/created-at ?created]
[(> ?created ?start)]
]
:inputs [:-1d-start]
}It will show all recently created pages. With bulk actions in Logseq DB it's easy to delete unwanted pages.