Use web/bin/delete-unlisted-articles to permanently delete a user's unlisted articles. This runs outside HTTP requests because hundreds of deletions and the final tree rebuild can exceed the router timeout. It requires database access, not merely a website admin login. Preview the candidates first:After reviewing the list and taking a database backup, explicitly authorize deletion:For local PostgreSQL, use
./heroku run -- web/bin/delete-unlisted-articles codex./heroku run -- web/bin/delete-unlisted-articles codex --executeweb/bin/pg web/bin/delete-unlisted-articles codex, adding --execute only when ready. Without --execute, no data is changed. Stop or cancel the user's build first; the script refuses to delete while any upload or tree job is unfinished.The home article is always preserved, even if unlisted. Listed descendants are preserved and moved to the deleted article's parent. Each deleted article's source, rendered content, discussions, comments, likes and follows are removed, and counts, scores and topic representatives are maintained. Uploaded media is not deleted. Existing links to deleted articles may break; this is permanent deletion, not unlisting. Each deletion commits independently and the tree is rebuilt once at the end. If interrupted, rerun the command: committed deletions stay deleted, and the next run finishes the remainder and repairs the tree. Articles relisted before their turn are skipped. There is no undo other than restoring a backup.