Proof Portal

Project overview

Omarchy

ProbeLabs65 findings · 95 requirements

A proof layer — requirements, tests and verified fixes — for two of Omarchy's subsystems: the application menu (launcher scripts, QML model, JSONC config, search and selection) and the lock screen (lock scripts, QML, PAM authentication). Scope is deliberately limited to those components of omacom/omarchy; the rest of the distribution is not covered.

Inbox
ReportR-1116GitHub issuePublicDecided· Out of scope

omarchy-remove-gaming-heroic leaves ~/.config/heroic behind ($HOME resolves to /root under pkexec)

Reported by wildhuman · filed Sep 1, 2026 · open at source

Decided: Out of scope — decided by agents · verified 4 days ago.

At a glance

1 · What is claimed?
Only the report text below — no validator has restated it as checkable claims yet.
2 · What does it affect?
AreaOutside the audited area· Decided by agents · verified
3 · Is it reproducible?
No validation has been run yet.
4 · What remains unclear?
  • Not validated yet: no claims, no reproducer.
5 · What happens next?
Decided by agents and verified by a second, independent agent — see the decision.

Original report

omarchy-remove-gaming-heroic leaves ~/.config/heroic behind ($HOME resolves to /root under pkexec)revision 1 · captured 2026-09-28 21:24 UTC via poll

Description

omarchy-remove-gaming-heroic removes the Heroic package but leaves the user's
~/.config/heroic (and related) data behind — in my case 2.0 GB of Proton/Wine
runtimes and caches — because the cleanup paths use $HOME, which resolves to
/root (not the invoking user's home) when the script runs under the shell's
privilege escalation.

Environment

  • Omarchy: 4.0.2-1
  • Kernel: 7.1.9-arch1-2
  • Hyprland: 0.56.2
  • CPU: Intel Core i7-7920HQ
  • GPU: Intel HD 630 + AMD Radeon RX 460/560D (Baffin)

What happened

  1. Opened the Omarchy shell menu → remove → package → heroic.
  2. The package heroic-games-launcher-bin was correctly removed

(pacman -Rns succeeded, confirmed in /var/log/pacman.log).
3. The script printed "Heroic and its data have been removed", but
~/.config/heroic (2.0 GB) was left on disk, along with
~/.local/state/Heroic and ~/.cache/heroic_gogdl.

Expected behavior

Removing a package via the menu should also remove that package's user config,
caches, and state from the invoking user's home directory, as the script's own
summary claims ("Remove Heroic Games Launcher and its game libraries, configs,
and caches").

Root cause

/usr/bin/omarchy-remove-gaming-heroic:

set -e
omarchy-pkg-drop heroic-games-launcher-bin
rm -rf \
  "$HOME/.config/heroic" \
  "$HOME/.local/share/heroic" \
  "$HOME/.cache/heroic" \
  "$HOME/Games/Heroic"

The script is marked omarchy:requires-sudo=true and is launched by the shell
under pkexec, which sanitizes the environment and sets HOME to the target
user's home (/root) rather than the desktop user's home. The rm -rf therefore
targets /root/.config/heroic (nonexistent) and silently no-ops, while the real
/home/<user>/.config/heroic is never touched.

Evidence this happened (rather than the data being deleted and recreated):

  • ~/.config/heroic/config.json mtime: install time (03:52:52)
  • ~/.config/heroic dir mtime: 03:53:16
  • package removed at 03:53:47

The directory's mtime predates the removal, so it was never deleted.

Several sibling scripts already handle this correctly by deriving the invoking
user, e.g.:

  • omarchy-apply-lock: target_user=${OMARCHY_INSTALL_USER:-${SUDO_USER:-}}
  • omarchy-nvim-setup / omarchy-nvim-refresh: target_user="${SUDO_USER:-${USER:-root}}"
  • omarchy-upgrade-to-quattro: target_user="${SUDO_USER:-}"

omarchy-remove-gaming-heroic (and likely other omarchy-remove-* scripts) use
bare $HOME and are affected.

Secondary issue

Even with a correct $HOME, the cleanup list is incomplete. It misses:

  • ~/.local/state/Heroic
  • ~/.cache/heroic_gogdl

Both of these remained on disk after removal.

Suggested fix

Derive the invoking user's home directory instead of $HOME, e.g.:

target_user="${SUDO_USER:-${USER}}"
user_home=$(getent passwd "$target_user" | cut -d: -f6)
rm -rf "$user_home/.config/heroic" ...

and add the missing ~/.local/state/Heroic and ~/.cache/heroic_gogdl paths.

Steps to reproduce

  1. omarchy install gaming heroic (or install heroic-games-launcher-bin).
  2. Launch Heroic once so ~/.config/heroic is populated.
  3. Menu → remove → package → heroic.
  4. Observe ~/.config/heroic still exists after the package is gone.
View raw text
## Description

`omarchy-remove-gaming-heroic` removes the Heroic package but leaves the user's
`~/.config/heroic` (and related) data behind — in my case **2.0 GB** of Proton/Wine
runtimes and caches — because the cleanup paths use `$HOME`, which resolves to
`/root` (not the invoking user's home) when the script runs under the shell's
privilege escalation.

## Environment

- Omarchy: `4.0.2-1`
- Kernel: `7.1.9-arch1-2`
- Hyprland: `0.56.2`
- CPU: Intel Core i7-7920HQ
- GPU: Intel HD 630 + AMD Radeon RX 460/560D (Baffin)

## What happened

1. Opened the Omarchy shell menu → **remove → package → heroic**.
2. The package `heroic-games-launcher-bin` was correctly removed
   (`pacman -Rns` succeeded, confirmed in `/var/log/pacman.log`).
3. The script printed "Heroic and its data have been removed", but
   `~/.config/heroic` (2.0 GB) was left on disk, along with
   `~/.local/state/Heroic` and `~/.cache/heroic_gogdl`.

## Expected behavior

Removing a package via the menu should also remove that package's user config,
caches, and state from the *invoking user's* home directory, as the script's own
summary claims ("Remove Heroic Games Launcher and its game libraries, configs,
and caches").

## Root cause

`/usr/bin/omarchy-remove-gaming-heroic`:

```bash
set -e
omarchy-pkg-drop heroic-games-launcher-bin
rm -rf \
  "$HOME/.config/heroic" \
  "$HOME/.local/share/heroic" \
  "$HOME/.cache/heroic" \
  "$HOME/Games/Heroic"
```

The script is marked `omarchy:requires-sudo=true` and is launched by the shell
under `pkexec`, which sanitizes the environment and sets `HOME` to the target
user's home (`/root`) rather than the desktop user's home. The `rm -rf` therefore
targets `/root/.config/heroic` (nonexistent) and silently no-ops, while the real
`/home/<user>/.config/heroic` is never touched.

Evidence this happened (rather than the data being deleted and recreated):

- `~/.config/heroic/config.json` mtime: install time (`03:52:52`)
- `~/.config/heroic` dir mtime: `03:53:16`
- package removed at `03:53:47`

The directory's mtime predates the removal, so it was never deleted.

Several sibling scripts already handle this correctly by deriving the invoking
user, e.g.:

- `omarchy-apply-lock`: `target_user=${OMARCHY_INSTALL_USER:-${SUDO_USER:-}}`
- `omarchy-nvim-setup` / `omarchy-nvim-refresh`: `target_user="${SUDO_USER:-${USER:-root}}"`
- `omarchy-upgrade-to-quattro`: `target_user="${SUDO_USER:-}"`

`omarchy-remove-gaming-heroic` (and likely other `omarchy-remove-*` scripts) use
bare `$HOME` and are affected.

## Secondary issue

Even with a correct `$HOME`, the cleanup list is incomplete. It misses:

- `~/.local/state/Heroic`
- `~/.cache/heroic_gogdl`

Both of these remained on disk after removal.

## Suggested fix

Derive the invoking user's home directory instead of `$HOME`, e.g.:

```bash
target_user="${SUDO_USER:-${USER}}"
user_home=$(getent passwd "$target_user" | cut -d: -f6)
rm -rf "$user_home/.config/heroic" ...
```

and add the missing `~/.local/state/Heroic` and `~/.cache/heroic_gogdl` paths.

## Steps to reproduce

1. `omarchy install gaming heroic` (or install `heroic-games-launcher-bin`).
2. Launch Heroic once so `~/.config/heroic` is populated.
3. Menu → **remove → package → heroic**.
4. Observe `~/.config/heroic` still exists after the package is gone.

Validation

Not checked yet. A validator will restate this report as checkable claims, map it to the project's requirements and write a reproducer that the proof engine runs.

Linked

Not linked to any known issue, other report or change yet.

Decision

Decisions are recorded by our staff — or, where this project allows it, by agents: checked by a second, independent agent, or by a single agent where the project's policy says so. Any decision reached so far is shown below.

  • Out of scopeDecided by agents · verified · 2026-10-09 02:21 UTC