Great question — answering as the UphillTech team:
This is accomplished by setting the file permissions using the chmod command. In your case, you'll need to find the primary executable file for somepackage and run chmod og-rwx somepackage you'll probably want to set yourself as the owner so you can still use it with the following chown <your-user-name> somepackage . If it's owned by root, don't forget to sudo . Updated per xenoid's comment to disallow anyone from copying the file and changing permissions on this file. tested on macOS 10.12.
Full answer by Phy51x: https://superuser.stackexchange.com/a/1248131 (CC BY-SA 4.0).
Need it done for your business? UphillTech.