Linux

Where Does CRUX Keep Ports and Package Data?

CRUX keeps its ports tree in /usr/ports with per port Pkgfiles, and pkgutils records installed packages in /var/lib/pkg/db.

Last updated

CRUX is ports based, so software arrives as build recipes rather than binaries. The tree lives in /usr/ports organized by collection with a Pkgfile per port describing sources and build steps. Reading a Pkgfile tells you exactly what an install will do.

Installed packages register in the pkgutils database under /var/lib/pkg. That database is the entire package bookkeeping: no cache folders, no metadata servers. Small and explicit is the whole appeal, and these two locations are nearly all there is to know.

Where CRUX stores this, by platform

Linux
/usr/ports

Ports collections with one folder and Pkgfile per port. Sync with ports -u. Browse before building to see sources and dependencies.

Linux
/var/lib/pkg/db

Installed package database for pkgutils. Query with pkginfo and remove with pkgrm. Back it up before risky manual changes.

Frequently asked questions

How do I install a port on CRUX?

Change to the port directory under /usr/ports and run fakeroot pkgmk -d to build, then pkgadd the result. Read the Pkgfile first since it lists sources and dependencies plainly. Ports are build scripts, not binaries.

How do I update CRUX?

Update the tree with ports -u, then check prt-get diff or outdated listings for your installed set. Rebuild affected ports in dependency order. The handbook covers the full cycle since updates are manual by design.

Notice an outdated path? Let us know.