Ошибка WARNING: APT: The following signatures were invalid в Ubuntu 16.04


Ошибка WARNING: APT: The following signatures were invalid в Ubuntu 16.04

If you are a Ubuntu 16.04 user, you might have encountered the following warning message when trying to update or install packages using the APT package management system:

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://archive.ubuntu.com/ubuntu xenial InRelease: The following signatures were invalid: BADSIG 123456789ABCDEF

This warning indicates that the APT system has detected that some of the repository keys used for package verification are invalid. This can happen for various reasons, such as a key expiration, a repository change, or a compromised key.

How to Fix the Invalid Signatures Error

Fortunately, fixing this issue is not difficult. Here are the steps you can follow to resolve the «following signatures were invalid» warning:

  • Step 1: Identify the Invalid Key
    sudo apt-key list
    This command will list all the keys currently installed on your system. Look for the key ID mentioned in the warning message (e.g., 123456789ABCDEF).
  • Step 2: Remove the Invalid Key
    sudo apt-key del 123456789ABCDEF
    This command will delete the specified key from your APT keyring.
  • Step 3: Update APT
    sudo apt update
    This command will refresh the package index and fetch the new key for the repository.
  • Step 4: Upgrade Packages
    sudo apt upgrade
    After updating APT, you can now upgrade your packages without encountering the invalid signatures error.

By following these simple steps, you can resolve the «following signatures were invalid» warning in Ubuntu 16.04 and ensure that your system is up to date and secure. Remember to always keep your system and repositories updated to protect against security vulnerabilities.