Mac OS X
Introduction
While many might not realize it (or admit it), Mac OS X is essentially a BSD kernel and tools. Apple has made many modifications, so some might not consider it "unix-y" any more. Kinda like Android and Chrome OS. Anyways...
Below is information I find helpful to keep around. Hopefully, you do too.
Table of Contents
Free Disk Space
In general, do not screw up your Mac OS X device by going to folders and removing things. This is dangerous if you are not an expert. And one should be cynical if someone suggests doing so, whether or not they claim to be an expert. For instance, never delete the operating system's cache folders. You may end up with an unusable system.
Option #1, Use Storage Management: This may sound odd coming from me, but for Mac OS X, the best place to start is Apple's tools. There are a few ways to get there, but I use Apple Menu -> About This Mac -> Storage -> Manage... You can also get to it via Applications -> Utilities -> System Information -> Window menu -> Storage Management.
Once you get there, be careful, but look around for things to remove. For instance, I often reload my friend's iPhones, iPads, etc. So I often have to remove the iOS downloads. These can be > 10 GB per version.
Option #2, Cleaning Cruft: The steps below clean up cache and other general "cruft" for High Sierra (10.3) to Big Sur (11.0). With Big Sur, there are new permissions in /private/var/protected/ that make me think the size in step #1 is not accurate.
check out "sudo du -d 1 -h /private"
if you are on 10.3 - 10.5, more the ~5GB means you can clean it up. on 11.0, I had ~3.5GB, see below for commentary
shutdown Mac, start up Mac, hold "Shift" key as soon as hear tone, keep holding till get login
make sure "Safe Mode" is in upper right corner
login and check command from step #1, should be about the same
shutdown Mac again, start up Mac normally
login and check command from step #1, should be down to ~5GB
if not, good luck, do not manually remove folders/content!
When doing this on Mac OS X 10.3 to 10.5, I could recover most of the 5GB reported. On Mac OS 11.0, the reporting of 3.5GB did not really change, but I still recovered about 2GB of space. Neither is much, but with a tight 64GB drive, every bit helps.
Option #3, Cleaning Backups: These steps will help cleanup Time Machine. It is only really necessary if something goes wrong; which Apple would never admit. You may not get too much space cleaned up.
More important is to be cautious; the snapshots you are about to remove are backups. Removing snapshots will affect the ability to restore files in the snapshot (local drive) and not on the Time Machine volume (external drive). If all you are worried about it losing current files, make sure that a full backup has completed to an external drive. DO NOT SKIP step #2!
sudo tmutil listlocalsnapshots / (make note of the dates, especially the latest)
sudo tmutil startbackup (this forces a backup)
sudo tmutil listlocalsnapshots / (check that there is a new backup)
sudo tmutil deletelocalsnapshots / (this will remove snapshots on your system, not the Time Machine volume)
sudo tmutil listlocalsnapshots / (now there shouldn't be any)
There used to be a way to "tune" Time Machine to not use local snapshots. I'm not sure when that went away, but it is not in Catalina nor Big Sur. If you want to "fine tune" step #4, check out the "thinlocalsnapshots" verb.
Installer USBs
Don't bother with the App Store, it is easier with the command line. Especially if you are trying to make an installer for an older Mac that doesn't support a recent version.
To find the list of installers available (for older macOSes, change dash after list to a space):
sudo softwareupdate --list-full-installers
To download a specific installer:
sudo softwareupdate --fetch-full-installer --full-installer-version #.#[.#]
The installer will be an app in the /Applications/ folder. To make the USB (example from a specific downloaded installer:
sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/ReplaceWithMountedUSB
Note that even the command line utilities stop making installers for certain versions of Mac OS available.
Networking
Change the system's hostname via the command line. Does it all locations, including System Preferences -> Sharing.
sudo scutil --set HostName "<put name here>"
.