whypkg
Canonical: gitlab.com/safteinzz/whypkg · Mirror: github.com/safteinzz/whypkg
wonder why the f* you have that package? know it now - a fast, cross-distro package investigator (apt, pacman, dnf, flatpak)
Install

What have I actually got?
[M] you installed it · [A] something pulled it in · [F] flatpak app · ↑ upgrade waiting

What was that thing called?
Type to filter. It matches descriptions as well as names, which is the only way anyone finds a flatpak app by the name on its window.

Why is this here?

pulled in by clang. That is the whole point. You also get what it arrived
alongside, whether it came from a repo or a local file you sideloaded (or a repo
that no longer exists), what needs it and what it needs. Enter on anything in
the list follows the thread; Esc comes back.
What is around it?
Ctrl-G draws the neighbourhood in the terminal. No browser, no image protocol,
so it survives ssh and tmux.

Enter re-centres on a neighbour and keeps digging, Esc retraces.
What is this upgrade about to pull down?

Every package with an upgrade waiting, and why it is on your machine. Pipe it, grep it, diff it before and after.
Commands
whypkg pending also takes --kernel, --apps, --auto and --sizes to show
one section at a time.
Keys
| Key | In the list |
|---|---|
| any character | filter, on names and descriptions |
↑ ↓ or Ctrl-P Ctrl-N |
move |
Tab |
cycle all / manual / auto / flatpak |
Enter |
open the highlighted package |
← → |
inside a package, flip between what needs it and what it needs |
Ctrl-G |
the dependency graph |
Esc |
back one level, and quit at the top |
Ctrl-C |
quit |
| Key | In the graph |
|---|---|
← ↓ ↑ → or hjkl |
move between packages |
Enter |
re-centre on the selected package |
Ctrl-G |
open that package's dossier |
Esc |
retrace, then leave the graph |
q |
leave the graph |
Distro support
| Distro family | Status |
|---|---|
| Debian / Ubuntu (apt) | ✅ working |
| Arch (pacman) | ✅ working |
| Fedora / RHEL (dnf) | ✅ working |
| Flatpak | ✅ working |
Flatpak apps appear alongside your system packages whenever flatpak is
installed. Each package manager sits behind a single Backend trait, so the
analysis and the interface are distro-agnostic.
It never touches your system
whypkg only reads. It will not sync, install or remove anything. The upgrade
list reflects your last database refresh (apt update, pacman -Sy,
dnf makecache), exactly like your package manager's own listing does.
Everything loads once at startup into an in-memory graph, so every hop while you browse is a hash-map lookup rather than a subprocess. The slow part is your package manager's own queries, about half a second.
It started as the bash apt-why / apt-pending scripts, kept in
legacy/.
License
AGPL-3.0-only.