What the heck is /pkg?

(anderegg.ca)

42 points | by GavinAnderegg a day ago ago

8 comments

  • CharlesW a day ago

    > "Turns out, this is part of macOS 27.0…"

    Part of macOS 26.4, in fact: https://eclecticlight.co/2026/09/19/macos-tahoe-26-4-changed... "The layout of those hasn’t changed in over six years up to and including macOS Tahoe 26.3.1, but has altered in 26.4 and Golden Gate, with the addition of a new firmlinked directory pkg."

    Apple doesn't do this stuff lightly. A search of WWDC sessions doesn't mention /pkg specifically, but I'd bet it's related to this: https://developer.apple.com/videos/play/wwdc2026/206/?time=6...

  • oefrha a day ago

    > It’s also not clear what the “pmk” in /etc/paths.d/10-pmk-global refers to.

    Maybe package management kit, if we go by recent Apple naming conventions.

  • torben-friis a day ago

    So they might be aiming for their own brew? Or is there some expectation for a different thing altogether?

  • jmclnx a day ago

    As a NetBSD user, I would guess it is for use with pkgsrc. That would be great for mac people if my wild guess is correct.

    http://pkgsrc.org/

    • Tomte 7 hours ago

      As a new Mac user I could not decide between Macports and Homebrew, and I went with pkgsrc/pkgin. Cannot complain, have had zero reason to revisit that decision ever since.

    • duskwuff a day ago

      Does pkgsrc use the env, etc, inv, and var subdirectories of /pkg seen here?

      • jmclnx 12 hours ago

        These are the directories under /usr/pkg on NetBSD based upon packages I installed. But setup depends upon OS and the person who set it up. I never heard of inv, maybe inv is a mac thing.

             bin   | include | pkgdb.refcount
             dict  | info    | pkgsrc
             etc   | lib     | qt5
             gcc12 | libdata | qt6
             gcc14 | libexec | sbin
             gcc16 | man     | share
             gnu   | pkgdb   | tests
        
        On NetBSD /var used for logs other data. But I suppose someone could configure under 'pkg' if they wanted to,
        • duskwuff 8 hours ago

          Probably not, then. The /pkg hierarchy on macOS doesn't look like that at all - there's no /pkg/bin, only /pkg/env/global/bin, where /pkg/env/global is a symlink to a subdirectory of /pkg/inv/envs.