{"id":924,"date":"2022-05-14T19:34:23","date_gmt":"2022-05-14T18:34:23","guid":{"rendered":"https:\/\/blog.thomarite.uk\/?p=924"},"modified":"2022-05-14T19:34:23","modified_gmt":"2022-05-14T18:34:23","slug":"apt-key-deprecation","status":"publish","type":"post","link":"https:\/\/blog.thomarite.uk\/index.php\/2022\/05\/14\/apt-key-deprecation\/","title":{"rendered":"apt-key deprecation"},"content":{"rendered":"\n<p>While updating Debian, I have seen this warning in the last days:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Fetched 11.4 kB in 3s (3,605 B\/s)\nW: http:\/\/www.deb-multimedia.org\/dists\/testing\/InRelease: Key is stored in legacy trusted.gpg keyring (\/etc\/apt\/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.\nW: http:\/\/deb.torproject.org\/torproject.org\/dists\/testing\/InRelease: Key is stored in legacy trusted.gpg keyring (\/etc\/apt\/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.\n                          <\/code><\/pre>\n\n\n\n<p>I did read the apt-key manual but I wasn&#8217;t very clear how to proceed. So I searched for a bit and found this <a href=\"https:\/\/askubuntu.com\/questions\/1398344\/apt-key-deprecation-warning-when-updating-system\">article<\/a>. And it was exactly what I needed.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt-key list\nWarning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).\n\/etc\/apt\/trusted.gpg\n--------------------\npub   rsa4096 2014-03-05 &#91;SC]\n      A401 FF99 368F A1F9 8152  DE75 5C80 8C2B 6555 8117\nuid           &#91; unknown] Christian Marillat &lt;marillat@debian.org>\nuid           &#91; unknown] Christian Marillat &lt;marillat@free.fr>\nuid           &#91; unknown] Christian Marillat &lt;marillat@deb-multimedia>\nuid           &#91; unknown] Christian Marillat &lt;marillat@deb-multimedia.org>\nsub   rsa4096 2014-03-05 &#91;E]\n\npub   rsa2048 2009-09-04 &#91;SC] &#91;expires: 2024-11-17]\n      A3C4 F0F9 79CA A22C DBA8  F512 EE8C BC9E 886D DD89\nuid           &#91; unknown] deb.torproject.org archive signing key\nsub   rsa2048 2009-09-04 &#91;S] &#91;expires: 2022-06-11]\n...\n...\n<\/code><\/pre>\n\n\n\n<p>Export the keys:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt-key export 65558117 | sudo gpg --dearmour -o \/usr\/share\/keyrings\/repo-debian-multimedia-testing.gpg \nWarning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).\n$\n \n \n$ sudo apt-key export 886DDD89 | sudo gpg --dearmour -o \/usr\/share\/keyrings\/repo-torproject-testing.gpg \nWarning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).\n$ \n<\/code><\/pre>\n\n\n\n<p>BTW, something I keep forgetting is what part of the pub key I needed.  It is the last 8 digits (that you can see in the output of apt-key list). And that was mentioned in the article but I didnt pay attention&#8230;<\/p>\n\n\n\n<p>Now update &#8220;\/etc\/apt\/sources.list&#8221; adding &#8220;signed-by=\/path to file created above&#8221; for each repo:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>###Debian Multimedia\ndeb &#91;arch=amd64 signed-by=\/usr\/share\/keyrings\/repo-debian-multimedia-testing.gpg] http:\/\/www.deb-multimedia.org testing main non-free\n\n###TOR\ndeb &#91;arch=amd64 signed-by=\/usr\/share\/keyrings\/repo-torproject-testing.gpg] http:\/\/deb.torproject.org\/torproject.org testing main\n<\/code><\/pre>\n\n\n\n<p>Update and see if warning is gone:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># aptitude update \nHit http:\/\/security.debian.org\/debian-security testing-security InRelease\nHit http:\/\/deb.debian.org\/debian testing InRelease                                                         \nIgn https:\/\/apt.fury.io\/netdevops  InRelease\nIgn https:\/\/apt.fury.io\/netdevops  Release\nHit http:\/\/www.deb-multimedia.org testing InRelease\nHit https:\/\/dl.google.com\/linux\/chrome\/deb stable InRelease                                                                                       \nHit https:\/\/packages.cloud.google.com\/apt cloud-sdk InRelease        \nHit http:\/\/deb.torproject.org\/torproject.org testing InRelease\nGet: 1 https:\/\/apt.fury.io\/netdevops  Packages\nIgn https:\/\/apt.fury.io\/netdevops  Translation-en_GB\nIgn https:\/\/apt.fury.io\/netdevops  Translation-en\nIgn https:\/\/apt.fury.io\/netdevops  Contents (deb)\nIgn https:\/\/apt.fury.io\/netdevops  Contents (deb)\nFetched 11.4 kB in 3s (3,650 B\/s)\n                                         \n# \n<\/code><\/pre>\n\n\n\n<p>All good<\/p>\n\n\n\n<p>And clean-up before finishing:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt-key del 65558117\nWarning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).\nOK\n$ sudo apt-key del 886DDD89\nWarning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).\nOK\n$ \n<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>While updating Debian, I have seen this warning in the last days: I did read the apt-key manual but I wasn&#8217;t very clear how to proceed. So I searched for a bit and found this article. And it was exactly what I needed. Export the keys: BTW, something I keep forgetting is what part of &hellip; <a href=\"https:\/\/blog.thomarite.uk\/index.php\/2022\/05\/14\/apt-key-deprecation\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;apt-key deprecation&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-924","post","type-post","status-publish","format-standard","hentry","category-unix"],"_links":{"self":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/924","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/comments?post=924"}],"version-history":[{"count":1,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/924\/revisions"}],"predecessor-version":[{"id":925,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/924\/revisions\/925"}],"wp:attachment":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/media?parent=924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/categories?post=924"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/tags?post=924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}