{"id":1190,"date":"2025-01-06T14:29:17","date_gmt":"2025-01-06T19:29:17","guid":{"rendered":"https:\/\/codefork.com\/blog\/?p=1190"},"modified":"2025-01-06T14:31:05","modified_gmt":"2025-01-06T19:31:05","slug":"downgrading-a-package-in-ubuntu","status":"publish","type":"post","link":"https:\/\/codefork.com\/blog\/index.php\/2025\/01\/06\/downgrading-a-package-in-ubuntu\/","title":{"rendered":"Downgrading a package in Ubuntu"},"content":{"rendered":"\n<p>A recent <a href=\"https:\/\/github.com\/docker\/compose\/issues\/12421\">regression<\/a> badly broke the docker compose plugin. A comment in that issue indicated it probably wouldn&#8217;t be fixed until after the holidays, so I needed to roll back to a previous working version.<\/p>\n\n\n\n<p>I&#8217;ve never actually had to do that with a package before. It was pretty easy, though the steps are not immediately apparent. Here&#8217;s what I did, maybe it will help someone trying to accomplish something similar.<\/p>\n\n\n\n<p>I&#8217;m using the repository for Docker Engine. You can load the repository URL in a browser to navigate around: <a href=\"https:\/\/download.docker.com\/linux\/ubuntu\/\">https:\/\/download.docker.com\/linux\/ubuntu\/<\/a><\/p>\n\n\n\n<p>Find the exact version string to tell apt to install. For third party repositories, the string will often include the distro and version in it. I&#8217;m running Ubuntu 22.04 (jammy) so I downloaded this text file containing the released versions for my distro, version, and architecture:<br><a href=\"https:\/\/download.docker.com\/linux\/ubuntu\/dists\/jammy\/stable\/binary-amd64\/Packages\">https:\/\/download.docker.com\/linux\/ubuntu\/dists\/jammy\/stable\/binary-amd64\/Packages<\/a><\/p>\n\n\n\n<p>Looking through that file, it&#8217;s evident that the last version released prior to 2.32.0 for the <code>docker-compose-plugin<\/code> package was &#8220;2.31.0-1~ubuntu.22.04~jammy&#8221;.<\/p>\n\n\n\n<p>Run this command to install that version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install docker-compose-plugin=2.31.0-1~ubuntu.22.04~jammy<\/code><\/pre>\n\n\n\n<p>Now apt needs to be told not to try to upgrade <code>docker-compose-plugin<\/code> the next time you run &#8220;apt upgrade&#8221;:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-mark hold docker-compose-plugin<\/code><\/pre>\n\n\n\n<p>When a new package is released with the fix, replace &#8220;hold&#8221; with &#8220;unhold&#8221; in the above command to allow the upgrade.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A recent regression badly broke the docker compose plugin. A comment in that issue indicated it probably wouldn&#8217;t be fixed until after the holidays, so I needed to roll back to a previous working version. I&#8217;ve never actually had to do that with a package before. It was pretty easy, though the steps are not &hellip; <a href=\"https:\/\/codefork.com\/blog\/index.php\/2025\/01\/06\/downgrading-a-package-in-ubuntu\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Downgrading a package in Ubuntu&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,24],"tags":[],"class_list":["post-1190","post","type-post","status-publish","format-standard","hentry","category-admin","category-linux"],"_links":{"self":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1190"}],"version-history":[{"count":2,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1190\/revisions"}],"predecessor-version":[{"id":1192,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1190\/revisions\/1192"}],"wp:attachment":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}