Terminal Assist
Using a terminal for the first time is daunting, and one command can take a whole system with it. Terminal Assist recognises the commands that do real damage, stops them, and says what to run instead. Every check names its own override.
Two layers, and only one of them matters
There are two places a check can live, and they are not equally trustworthy.
The check inside pacman
The real guard is an ALPM hook. It runs as a
PreTransaction action on every package removal, is marked
AbortOnFail, and a non-zero exit stops the transaction dead.
Because it lives inside pacman itself, it applies no matter how the transaction was started: from your shell, from a script, from an AUR helper, or from the App Store. There is no way to route around it that does not involve removing the hook.
The layer in your shell
A shell function checks the command line before it runs and warns about
things pacman never sees, such as a partial upgrade or a destructive
rm. This layer is a courtesy, not a guard. It is trivially
bypassed, and it is meant to be: it is there to catch a typo and explain it,
not to stand between you and your own machine.
What it stops
The removal guard knows which packages a system does not survive losing, and says why rather than simply refusing:
| Package | Why it is guarded |
|---|---|
systemd | the init system, the machine will not boot without it |
glibc | the C library, essentially every program depends on it |
pacman | the package manager, you could not install anything back |
bash | the system shell, install scripts and boot units need it |
coreutils | core utilities like ls, cp and rm |
filesystem | the base directory layout |
sudo | how you become root, you may lock yourself out |
linux-firmware | hardware firmware, wifi and graphics may stop working |
mkinitcpio | builds the boot image, future kernel updates would not boot |
limine | the bootloader, the machine will not boot |
sakura-snapshot-boot | snapshot rollback, you would lose the undo button |
The shell layer additionally recognises:
- Partial upgrades.
pacman -Sy somethingrefreshes the package list without upgrading the system, and that mismatch is the most common way an Arch install breaks. It tells you to use-Syu. - Removing the running kernel, which leaves nothing to boot.
- Destructive filesystem commands aimed at a path that would take the system with it.
Overriding a check
Every message ends with the exact command that gets past it. Nothing here is a wall; it is a speed bump with a sign on it.
# the message tells you which rule fired, and you name it
sudo SAKURA_ASSIST_OVERRIDE=glibc pacman -R glibc
The override names the specific rule. It is deliberately not a universal skeleton key: setting it to bypass one check does not silently disable the other ten, and a habit of pasting one override does not turn into a habit of disabling the system. More than one rule can be named at once, separated by commas.
It is not a nanny. Around thirty rules: eleven packages the removal guard will not let go quietly, and about twenty patterns the shell layer recognises. It is not a filter on what you are allowed to learn, and it never refuses without telling you both why and how to proceed anyway.