Find MacOS installer path

When you do an upgrade of MacOS, it can be hard to locate the download package as it caches to disk.

Sometimes you may want to see the progress of the download, the size of the file or just troubleshoot an issue with the upgrade process. The following steps show you what commands to run to identify the path of the installer.

  1. Login to your Mac, open System Preferences, Software Update and start the update process
  2. Launch the Terminal app and change to root by running sudo su and enter your local admin password
  3. Maximise your Terminal to fit the screen. The next command needs as much screen real estate as possible
  4. Once you are root, run fs_usage -f filesys . This will enumerate all active disk I/O on the system. Data will be printed to the console very quickly, so once you see something with a path containing InstallAssistant.pkg.partial you can press Ctrl+C to break
  5. If you can see the entire path that references the InstallAssistant.pkg, then all good, jump to step 10. If not, do the following to locate the full path
  6. With the part of the path that you can see, you should see a random string, that may look something like this puuz6c0epc7o0ozyovvi6tjxhzpf6uf04. Use the find command to locate the full path by running the following:
  7. find / -name "puuz6c0epc7o0ozyovvi6tjxhzpf6uf04" 2>&1 | grep -v "Operation not permitted"
  8. Note that we remove results from the search that result in “Operation not permitted” so that we can reduce search noise
  9. After some time, we should see something like  /private/var/folders/zz/zyxvpxvq6csfxvn_n00000s0000068/C/ returned, which is the path we are looking for
  10. Now, if you cd to the folder above, you can monitor the download progress on disk with ls -lha
  11. After the file has downloaded, it will be moved to /Applications/MacOS "version" and will remain here until the installation has completed. If you want to take a copy of the package, copy it from this location before the install is complete

Linux bash bang

I was going to write a blog about this, then I came across a Red Hat blog that has all this laid out nice. No point re-inventing the wheel. A while back, I was on the phone with a vendor at work, and the admin controlling the system I was facilitating access to typed !105 and I was like… OK, what just happened, then I realised that '!' has all sorts of cool functionality in regards to bash history. When you review your bash history by typing 'history' , you will notice each entry in your command history has a line number. To repeat a command from your history, you just type !<line #> and the command is repeated. I now use this all the time, especially for complex commands that take some work to get perfect, just bang# it and you’re good. Somehow it’s quite satisfying. Check out the other cool things you can do with ! in man history or by checking out the Red Hat blog above.