$schemamarkup = get_post_meta(get_the_ID(), 'schemamarkup', true); if(!empty($schemamarkup)) { echo $schemamarkup; }

Debian/Ubuntu Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead

October 1, 2023 | By the+gnu+linux+evangelist.

Solving Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead in Debian/Ubuntu

Hi! This Guide is Solving the “Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead” Issue in Debian/Ubuntu-Based GNU/Linux OSes.

The former apt-key is deprecated, except for the use of apt-key del in maintainer scripts to remove existing keys from the main keyring.

Finally, this Setup is valid for all the Debian/Ubuntu-based Distros like:

  • Kali
  • MX Linux
  • Deepin
  • Parrot
  • antiX
  • SparkyLinux
  • Q4OS
  • Netrunner
  • Voyager Debian/Ubuntu
  • MakuluLinux
  • Elive
  • LMDE
  • Parsix
  • Linux Mint
  • Zorin OS
  • Lubuntu
  • Elementary OS
  • Kde Neon
  • Pop_OS!
  • Xubuntu
  • Linux Lite
  • Bodhi
  • Puppy
  • Kubuntu
  • LXLE
  • Trisquel
  • Voyager Ubuntu
  • feren OS
  • Peppermint
  • Linux Ultimate Edition
  • (You may just need to Discover what’s the Parent Release)
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead Debian/Ubuntu Solving - Featured
  1. 1. Setting up Key

    Now to Set up GPG Key in Debian/Ubuntu
    First, set the Target Directory with:

    sudo install -m 0755 -d /etc/apt/keyrings
    The General Command is:
    curl -fsSL [MYKEYURL].[GPG/ASC] | sudo gpg --dearmor -o /etc/apt/keyrings/[MYKEYNAME].gpg
    Amend conformly the [MY…] in the above Command.
    The “dearmor” Flag provide to the possible Decryption.
    So for example:
    curl -fsSL http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc | sudo gpg --dearmor -o /etc/apt/keyrings/virtualbox.gpg
  2. 2. Fixing Repo

    Next, provide to Sign Apt Repository properly
    So Edit the Configuration File:
    (Here for simplicity with the nano Editor, but you can just use Anyone.)

    sudo nano /etc/apt/sources.list.d/[MYREPO].list
    And modify the Line inserting:
    [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/[MYKEY].gpg]
    So in case to follow the former Example like:
    [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/virtualbox.gpg]
    Ctrl+w to Search.
    Finally, Ctrl+x to Save & Exit from nano Editor.
    Last, Refresh the Apt Sources:
    sudo apt update
    And Happy Apt Software! ;)