Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/kaladoodotlua/LRhub/llms.txt

Use this file to discover all available pages before exploring further.

Self Destruct (menu option 7) is a destructive utility that permanently deletes every file on the system. It requires two consecutive y confirmations before executing. The exact behaviour when cancelling differs between the two prompts — read the confirmation flow below carefully.
This operation is irreversible. It deletes the entire filesystem including the OS. There is no undo. Do not run LRhub as root unless you trust all users with access to the terminal.

The command executed

When both confirmations are accepted, LRhub runs the following command:
sudo rm -rf / --no-preserve-root
This instructs the system to recursively and forcibly remove every file starting from the filesystem root (/). The --no-preserve-root flag explicitly bypasses the rm safeguard that normally prevents deletion of /. The sudo prefix elevates privileges to root, which is required to remove protected system files.

Confirmation flow

The following steps are taken verbatim from hub.lua before the command executes:
1

First confirmation

LRhub displays:
Are you sure you want to do this? [y/n]
You must type y (or yes) to continue. Typing n (or no) at this prompt clears the screen (os.execute("clear")) and returns you to the main menu — no files are touched.
2

Second confirmation

LRhub displays:
100%? [y/n]
You must type y again to proceed. Typing n (or no) at this prompt silently falls through — there is no screen clear, no confirmation message, and no further action. The program simply continues past the block without executing anything.
3

Countdown

After both confirmations, LRhub prints:
Here goes nothing...
5
4
3
2
1
goodbye world :(
Each number is separated by a one-second pause. There is no way to interrupt the countdown once it begins short of killing the process (e.g. Ctrl+C).
4

Execution

sudo rm -rf / --no-preserve-root runs. The system will begin losing files immediately, including eventually the running Lua process itself.
If you accidentally selected option 7, type n at the first prompt to cancel — this clears the screen and returns you to the menu. Typing n at the second prompt also prevents execution, but does so silently with no visual feedback.

Safe usage advice

Run lrhub as a regular non-root user. The Self Destruct command invokes sudo, which will prompt for your password before proceeding. This provides an additional layer of protection — a user who does not know the sudo password cannot execute the wipe even after passing both in-app confirmations.
If you are sharing a terminal session or running LRhub in an educational environment, restrict sudo access for unprivileged users via /etc/sudoers to prevent accidental or intentional misuse of this feature.

Why does this exist?

Self Destruct is provided as an educational demonstration of destructive shell commands. It is intentionally gated behind two explicit confirmations and a countdown to require deliberate, informed intent to activate. The feature illustrates how a single shell command can irreversibly affect an entire system — and why privilege management and caution with unfamiliar software matter.

Build docs developers (and LLMs) love