ap(1)
π ap(1) β like, the aports tree query tool, bestie
okay so real talk: this is ap from the General Commands Manual section, and honestly? she's that girl. she queries and analyzes an aports tree for you, no cap. πΈ
β¨ NAME β¨
ap β query and analyze an aports tree π¦
β¨ SYNOPSIS β¨
ap [-h] [-d DIR] SUBCOMMAND [PKG...]
that's the whole vibe check. subcommand goes in the middle, packages go at the end, and the flags are optional but iconic. π
β¨ DESCRIPTION β¨
so what does ap actually do? bestie, she queries and analyzes an aports tree. that's it, that's the whole personality. π
she's gonna give you info about packages, dependencies, and build requirements β the trio of things you're always asking her about at 2am anyway. literally main character energy for anyone poking around Alpine packaging. π
β¨ OPTIONS β¨
-d,--dir=DIRβ useDIRas the repository directory instead of the current directory. so if you're not in the aports tree, just point her at it, she's not gonna guess. π-h,--helpβ show help and exit. the classic "wait how does this work again" move, we've all been there. π
β¨ SUBCOMMANDS β¨
so this is where the magic happens. pick your fighter:
apk-listβ list all apk files. all of them. every single one. βbuild-listβ list packages that can/should be rebuilt. yes "can/should" β she's not gonna make that decision for you, she's just gonna tell you who's up. π§builddirs PKG...β print the build directories for the specified packages in build order. so you get them in the right sequence, not just a pile. πcircular-aports [PKG ...]β find aports with circular build time dependencies. yes, the cursed ones. the ouroboros packages. πdump-jsonβ dump all abuilds from the aports tree to JSON. for when you want the data machine-readable and not vibes-readable. π₯οΈβ¨listβ print all packages built from the aports tree. straightforward. slay. πrecursive-deps PKG...β recursively print all make dependencies for the specified packages. all the way down, bestie. all the way. πrecursive-revdeps PKG...β recursively print all reverse make dependencies for the specified packages. who depends on you, and who depends on them. the whole friend group. π«Άrevdep PKG...β print reverse dependencies for the specified packages. just one layer, no recursion. quick lil check-in. πsources PKG...β list sources for the specified packages. where does she even come from. πtoplevel-aportsβ list top-level aports, meaning packages with no reverse dependencies. the ones nobody depends on. the independents. the CEOs. π
β¨ EXAMPLE β¨
here's a real one, look how cute she looks in context:
cd ~/aports/main/ && ap recursive-revdeps python3
cd into main, then ask who reverse-depends on python3. spoiler: it's everyone. it's always everyone. ππ₯
β¨ CAVEATS β¨
listen. big one.ap(1)operates on a single repository and will not find (reverse) dependencies across repositories. so like β it will not find dependants incommunityfor a package inmain. she's not being lazy, she literally just can't see over there. don't blame her, blame the boundaries. π
β¨ SEE ALSO β¨
buildrepo(1), abuild(1), APKBUILD(5), apk(8) β the rest of the friend group, go say hi. π¦
β¨ AUTHORS β¨
Natanael Copa <ncopa@alpinelinux.org> and other lua-aports authors. absolute icons, we stan. ππ
okay that's the whole page, you're basically an aports expert now, no cap πβ¨
this page dropped 2026-04-13, part of the ap(1) manual β go forth and query, bestie π
π¦
π¦ where this page comes from
- alpine 3.24: lua-aports-doc 1.3.2-r3 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms