good tutorial: https://www.devdungeon.com/content/gpg-tutorial === To Encrypt/Decrypt a File === gpg --encrypt --recipient 'user@emailaddress.com' example.txt gpg --encrypt --recipient $USER example.txt gpg --decrypt example.txt.gpg gpg --output example.txt --decrypt example.txt.gpg === Create a key === gpg --gen-key gpg --full-generate-key === Show keys === To list a summary of all keys gpg --list-keys gpg --list-secret-keys To show your public key gpg --armor --export To show the fingerprint for a key gpg --fingerprint KEY_ID === Search for keys === gpg --search-keys 'user@emailaddress.com' === Export/Import keys === gpg --output ~/public_key.txt --armor --export KEY_ID gpg --output ~/private_key.txt --armor --export-secret-key KEY_ID Retrieve the key files which you previously exported. gpg --import ~/public_key.txt gpg --allow-secret-key-import --import ~/private_key.txt Then delete the private key file. shred -zu ~/private_key.txt === Delete key === Retrieve key ID then delete gpg --list-secret-keys gpg --list-keys gpg --delete-keys ID gpg --delete-secret-keys ID