If automation sounds risky, or if you are on a newer firmware (above 9.00), you have alternatives:
Instead of manually transferring a PKG file to a USB drive, plugging it into the PS4, navigating to Debug Settings, and installing it one by one, an auto installer aims to handle the process remotely or in batches. auto package installer ps4