I missed something in my previous post: the directory for the port had been cleaned, and apparently the pkg command doesn't expect that, nor does it know what to do about it. So it bails. If you build first, than issue the pkg command, it does work, as best I can tell. If you have the super-useful cddir* command in your shell, you can use port build foo && port pkg foo && cddir foo, where foo is the port you just packaged. It will be in the work directory. So perhaps the packaging stuff is closer to reality than I remembered. * port() { case "$1" in cddir) if [ -z "$2" ]; then cd `port echo all | head -n 1 | xargs port dir`/../.. else cd `port dir $2` fi ;; *) /opt/local/bin/port "$@" ;; esac }