Urgent.News

What's breaking now, across thousands of outlets.

Tech

What the heck is /pkg?

While investigating a PATH issue, a surprising discovery was made: an entry for /pkg/env/global/bin in the PATH list. This led to confusion, as the purpose of this directory and its contents remained unclear. To understand the background, it's important to note that macOS has included a path_helper utility since Mac OS X 10.5 in 2007.

This utility reads entries from /etc/paths and any files within the /etc/paths.d directory. In previous macOS versions, path_helper was primarily used by Apple to support new utility locations and Cryptexes. Recently, in macOS 27.0, a new file called 10-pmk-global was added to /etc/paths.d, which in turn added /pkg/env/global/bin to the PATH list.

This discovery prompted further investigation, as no one seemed to know what the /pkg directory was for or how it would be utilized. The /pkg directory contains four subdirectories: env, etc, inv, and var. Based on its name and subdirectories, it might be related to an upcoming package management system, but this is purely speculative.

Apple recently took over the Swift Package Index, but there seems to be no clear connection. The reason for having a root-level directory to manage project-level dependencies is also not apparent. The "pmk" in the file name remains a mystery, and Apple has not provided any further details on the purpose of this new directory.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at anderegg.ca →

More in Tech

More from Monday 19 October →