To find any expired repository keys and their IDs, use apt-key
as follows:
LANG=C apt-key list | grep expired
You will get a result similar to the following:
pub 4096R/BE1DB1F1 2011-03-29 [expired: 2014-03-28]
The key ID is the bit after the /
i.e. BE1DB1F1
in this case.
To update the key, run
sudo apt-key adv --recv-keys --keyserver keys.gnupg.net BE1DB1F1
Note: Updating the key will obviously not work if the package maintainer has not (yet) uploaded a new key. In that case there is little you can do other than contacting the maintainer, filing a bug against your distribution etc.
One liner to update all expired keys: (thanks to @ryanpcmcquen)
for K in $(apt-key list | grep expired | cut -d"https://serverfault.com/" -f2 | cut -d' ' -f1); do sudo apt-key adv --recv-keys --keyserver keys.gnupg.net $K; done
Related Posts:
- What is difference between arm64 and armhf?
- Uncompress tar.gz file
- screen Cannot open your terminal ‘/dev/pts/0’ – please check
- Bash script prints “Command Not Found” on empty lines
- python-dev installation error: ImportError: No module named apt_pkg
- Anyone else experiencing high rates of Linux server crashes during a leap second day?
- How can I run Debian stable but install some packages from testing?
- What’s the best way of handling permissions for Apache 2’s user www-data in /var/www?
- List of files installed from apt package
- How to install/change locale on Debian?
- How can I export the privileges from MySQL and then import to a new server?
- Is it possible to reboot a Linux OS without rebooting the hardware?
- What does “debconf: delaying package configuration, since apt-utils is not installed” mean?
- What is the debian-sys-maint MySQL user (and more)?
- How should an IT department choose a standard Linux distribution?
- Chmod 777 to a folder and all contents [duplicate]
- Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running?
- Amazon Linux: apt-get: command not found
- How do I find all files containing specific text on Linux?
- “Couldn’t find a file descriptor referring to the console” on Ubuntu bash on Windows
- Where can I find php.ini?
- gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now
- How to install grub after installing Windows 10
- Linux: ‘Username’ is not in the sudoers file. This incident will be reported
- “E: Unable to locate package python-pip” on Ubuntu 18.04 [duplicate]
- How can I exclude directories from grep -R?
- How to exclude a directory in find . command
- mysql_config not found when installing mysqldb python interface
- Explaining the ‘find -mtime’ command
- Creating a new directory in C
- Extract file basename without path and extension in bash
- How to change permissions for a folder and its subfolders/files in one step
- mv: cannot stat error : No such file or directory error
- Linux error while loading shared libraries: cannot open shared object file: No such file or directory
- Pseudo-terminal will not be allocated because stdin is not a terminal
- linux command to get size of files and directories present in a particular folder?
- ./configure : /bin/sh^M : bad interpreter
- TCP congestion control version: HTCP module vs highspeed module in linux kernel
- How to use regex with find command?
- What is the difference between /etc/rc.local and ~/.bashrc?
- Snort Message – WARNING: No preprocessors configured for policy 0
- Compile the Fortran program in Windows using gfortran
- How can I set the ‘backend’ in matplotlib in Python?
- Unable to establish SSL connection upon wget on Ubuntu 14.04 LTS
- Getting stty: standard input: Inappropriate ioctl for device when using scp through an ssh tunnel
- configure: error: cannot run C compiled programs
- How to make rpm auto install dependencies
- How do I install chkconfig on Ubuntu?
- “find: paths must precede expression:” How do I specify a recursive search that also finds files in the current directory?
- Apache server keeps crashing, “caught SIGTERM, shutting down”
- List all mounts in Linux
- How to use sed to extract substring
- Wait for user input in C?
- Difference between exec, execvp, execl, execv?
- Restarting cron after changing crontab file?
- tar: Error is not recoverable: exiting now
- cd into directory without having permission
- How to enable Bash in Windows 10 developer preview?
- WordPress sites being filled with random PHP files
- how to properly mount external server directory for wordpress uploads
- WordPress cloning issue
- Is it a good idea to edit WordPress within Eclipse? [closed]
- What permissions should my website files/folders have on a Linux webserver?
- Why is my crontab not working, and how can I troubleshoot it?
- Can I automatically add a new host to known_hosts?
- Why is “chmod -R 777 /” destructive?
- Environment variables of a running process on Unix?
- How to check if a library is installed?
- Meaning of the buffers/cache line in the output of free
- Is it normal to get hundreds of break-in attempts per day?
- How to cd into a directory with this name “-2” (starting with the hyphen)?
- how to disable SSH login with password for some users?
- How do I prevent accidental rm -rf /*?
- Is it possible to detach a process from its terminal? (Or, “I should have used screen!”) [duplicate]
- What does Virtual memory size in top mean?
- What’s the best way to check if a volume is mounted in a Bash script?
- How do I find the UUID of a filesystem
- Find out symbolic link target via command line
- Meaning of directories on Unix and Unix like systems
- How to handle security updates within Docker containers?
- How can I port forward with iptables?
- Why do we use a OS Base Image with Docker if containers have no Guest OS?
- Is it possible to make Nginx listen to different ports?
- REJECT vs DROP when using iptables
- Linux command line best practices and tips?
- How to run command as user who has /usr/sbin/nologin as Shell?
- How to make Windows 7 USB flash install media from Linux?
- How to get pid of just started process
- What limits the maximum number of connections on a Linux server?
- How to do the port forwarding from one ip to another ip in same network?
- How to disable everything in crontab -l?
- df says disk is full, but it is not
- What is the maximum port number?
- Linux – Is there a way to prevent/protect a file from being deleted even by root?
- How to sort ps output by process start time?
- Is there a proper way to clear logs?
- protocol version mismatch — is your shell clean?
- How do I join two named pipes into single input stream in linux
- Command line program to test DHCP service
- Service start request repeated too quickly, refusing to start limit