Encrypt a File with GPG

gpg -c filename.tar.gz
This will ask for a passphrase either with GUI popup or CLI popup

Decrypt a File

gpg filename.tar.gz
This will decrypt a file

One thing you'll notice, once the file is decrypted and you delete and decrypt the file again, the software will not ask for a password as it's been cached by gpg-agent. [1]

Disable Caching of Passphrase on System

Create a gpg-agent.conf file

cat << EOM >> ~/.gnupg/gpg-agent.conf 
default-cache-ttl 1
max-cache-ttl 1
EOM

Reload the gpg-agent

gpgconf --reload gpg-agent

GPG