macOS: Save disk space by moving apps to external drives
sudo mv /Applications/foo /Volumes/bar/Applications/foo && sudo ln -s /Volumes/bar/Applications/foo /Applications/foo
Because Mac app bundles contain everything in one place, it makes running them from anywhere, including from a device such as a USB flash drive or external HDD, possible. So if your Mac has a mere 256GB of storage (as mine does), you can free up large quantities of disk space by storing apps like, say, Xcode on external devices.
man ls