Often application will download additional files (like full sound library in GarageBand) or updates, install them, and then delete the installation file/package. Sometimes, I want to be able to install those again without having to download them from the internet again (for example, if I deleted the sound library due to lack of space in the boot drive, but I need it again sometime afterwards). However, it seems like there is no documented or easy ways to prevent the deletion. One possible solution might be watching the temporary directory and hard-linking every file that appeared, but I don’t know of a software/script that will do it.
macOS High Sierra 10.13.6 (17G12034) MacBook Pro (13-inch, 2017, Four Thunderbolt 3 Ports) Filesystem: apfs