I installed pgAdmin 4 (APT) according their documentation.
# Install the public key for the repository (if not done previously):
curl -fsS https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo gpg --dearmor -o /usr/share/keyrings/packages-pgadmin-org.gpg
# Create the repository configuration file:
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'
...
After uninstalling pgAdmin 4 I tried to remove gpg keys which
I can see them in
/usr/share/keyrings$ ls
packages-pgadmin-org.gpg ubuntu-advantage-realtime-kernel.gpg
pop-archive-keyring.gpg ubuntu-advantage-ros.gpg
ubuntu-advantage-cc-eal.gpg ubuntu-archive-keyring.gpg
ubuntu-advantage-cis.gpg ubuntu-archive-removed-keys.gpg
ubuntu-advantage-esm-apps.gpg ubuntu-cloudimage-keyring.gpg
ubuntu-advantage-esm-infra-trusty.gpg ubuntu-cloudimage-removed-keys.gpg
ubuntu-advantage-fips.gpg ubuntu-master-keyring.gpg
But if I use sudo apt-key list
I do not see the pgadmin keys there and so I am not able to remove them (using sudo apt-key del XXXXXXX
).
Can someone help me how to get rid of keys imported when I installed pgAdmin 4? Thank you very much.
EDIT:
I tried find /usr/share/ -name \*.gpg | xargs -n 1 gpg
and find the number or pgAdmin key.
But the command
gpg --delete-key E8697E2EEF76C02D3A6332778881B2A8210976F2
did not help. I got this error
gpg: key "E8697E2EEF76C02D3A6332778881B2A8210976F2" not found: Not found
gpg: E8697E2EEF76C02D3A6332778881B2A8210976F2: delete key failed: Not found