A log of useful commands I collect over time.
Go to file
Greg Gauthier ead53f5dea added gpg key repair instructions 2023-07-21 12:05:51 +00:00
README.md added gpg key repair instructions 2023-07-21 12:05:51 +00:00

README.md

shell-commands quick reference

Note: many of these command shortcuts have prerequisite command line tools installed, such as:

This list is primarily for my own benefit, but if you can get some use out of it, feel free to copy it.

Search for Brave desktop icons, and remove them:

grep -L -i 'thing-inside-the-file' $(fd -H "^brave-(.*)-default\.desktop" ~)|xargs rm

This is because between Brave and Gnome, various duplicates get stored all over the place. eg:

gmgauthier@plato $ grep -L -i 'youtube' $(fd -0 -H "^brave-(.*)-default\.desktop" ~)
/home/gmgauthier/.gnome/apps/brave-cdbkgaenbacighhafdaakdmolegfebcf-Default.desktop
/home/gmgauthier/.local/share/applications/brave-cdbkgaenbacighhafdaakdmolegfebcf-Default.desktop

Fixing apt keys after a manual gnupg upgrade

sudo apt reinstall gpg
which gpg
/usr/local/bin/gpg
sudo ldconfig /usr/local/bin/gpg
sudo apt update
gpg --version

The "reinstall" in the first command won't actually break your fresh install. when you run the version, it will still report your new version.

gmgauthier@plato $ sudo apt reinstall gpg                                                                              
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/928 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 732471 files and directories currently installed.)
Preparing to unpack .../gpg_2.2.27-2+deb11u2_amd64.deb ...
Unpacking gpg (2.2.27-2+deb11u2) over (2.2.27-2+deb11u2) ...
Setting up gpg (2.2.27-2+deb11u2) ...
Processing triggers for man-db (2.9.4-2) ...

And yet, a moment later:

gmgauthier@plato $ gpg --version                                                                                       
gpg (GnuPG) 2.4.3-unknown
libgcrypt 1.10.2-unknown
NOTE: THIS IS A DEVELOPMENT VERSION!
It is only intended for test purposes and should NOT be
used in a production environment or with production keys!
Copyright (C) 2023 g10 Code GmbH
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /home/gmgauthier/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

gmgauthier@plato $ which gpg                                                                                           
/usr/local/bin/gpg
gmgauthier@plato $ sudo ldconfig /usr/local/bin/gpg                                                                    
gmgauthier@plato $ sudo apt update                                                                                     
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://security.debian.org/debian-security bullseye-security InRelease                                           
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease                                                          
Hit:4 http://deb.debian.org/debian bullseye-proposed-updates InRelease                                                 
Hit:5 http://deb.debian.org/debian bullseye-backports InRelease                                                        
Hit:6 https://brave-browser-apt-release.s3.brave.com stable InRelease                                                  
Hit:7 https://download.mono-project.com/repo/debian vs-buster InRelease                                                
Hit:8 https://repo.protonvpn.com/debian stable InRelease                                             
Hit:9 https://deb.beekeeperstudio.io stable InRelease                          
Reading package lists... Done                            
Building dependency tree... Done
Reading state information... Done
All packages are up to date.