{"id":3543,"date":"2016-09-07T20:16:20","date_gmt":"2016-09-07T18:16:20","guid":{"rendered":"https:\/\/adrhc.go.ro\/wordpress\/?p=3543"},"modified":"2021-08-28T14:06:29","modified_gmt":"2021-08-28T12:06:29","slug":"apt","status":"publish","type":"post","link":"https:\/\/adrhc.go.ro\/blog\/apt\/","title":{"rendered":"APT (Advanced Package Tool)"},"content":{"rendered":"<pre>\r\n<strong>checking that python3-pip package is installed<\/strong>\r\n<code>dpkg --get-selections python3-pip<\/code>\r\n\r\n<strong>search packages by name using REGEX<\/strong>\r\nsee <a href=\"http:\/\/newbiedoc.sourceforge.net\/tutorials\/apt-get-intro\/info.html\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/newbiedoc.sourceforge.net\/tutorials\/apt-get-intro\/info.html<\/a>\r\napt-cache search libapr\r\napt-cache search 'php.*sql'\r\napt-cache search apache.\\*perl\r\napt-cache search elvis\\|vim\r\n\r\n<strong>list the contents of a (not-installed) package<\/strong>\r\nsee <a href=\"https:\/\/unix.stackexchange.com\/questions\/6311\/how-to-find-out-which-not-installed-package-a-file-belongs-to\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/unix.stackexchange.com\/questions\/6311\/how-to-find-out-which-not-installed-package-a-file-belongs-to<\/a>\r\napt-file list mysql-client-5.1\r\n\r\n<strong>showing package information<\/strong>\r\napt-cache showpkg libconfig-dev\r\n\r\n<strong>check a package status<\/strong>\r\ndpkg --get-selections | grep apache2\r\n\r\n<strong>find which package contains a file<\/strong>\r\nuse also <a href=\"http:\/\/www.debian.org\/distrib\/packages#search_contents\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.debian.org\/distrib\/packages#search_contents<\/a>\r\nsudo apt-file update\r\napt-file -i search --regex \/knemo-modem-transmit-receive.svg$ -> <em>doesn't work for this specific file<\/em>\r\napt-file -i search knemo-modem-transmit-receive.svg -> <em>doesn't work for this specific file<\/em>\r\napt-file search fusil\/fusil-ogg123 -> <em>this works so for the above fails maybe the repository from where the files were installed now is missing<\/em>\r\ndpkg --search knemo-modem-transmit-receive.svg -> <em>but this one works (with owning package installed)<\/em>\r\ndpkg -S 'doc\/*sql'\r\n\r\n<strong>show package summary & contents<\/strong>\r\ndpkg -l mongodb-compass\r\ndpkg -L kibana\r\ndpkg-query -L kibana\r\n\r\n<strong>install deb file with automatic dependency resolution<\/strong>\r\nsudo apt-get install .\/Downloads\/skypeforlinux-64.deb\r\n\r\n<strong>install all packages you need to compile $PACKAGENAME<\/strong>\r\n<a href=\"https:\/\/askubuntu.com\/questions\/481\/how-do-i-find-the-package-that-provides-a-file\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/askubuntu.com\/questions\/481\/how-do-i-find-the-package-that-provides-a-file<\/a>\r\napt-get build-dep $PACKAGENAME\r\n\r\n<strong>list repositories<\/strong>\r\ngrep -rh ^deb \/etc\/apt\/sources.list \/etc\/apt\/sources.list.d\/\r\n\r\n<strong>remove repository<\/strong>\r\nsudo add-apt-repository --remove ppa:whatever\/ppa\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>checking that python3-pip package is installed dpkg &#8211;get-selections python3-pip search packages by name using REGEX see http:\/\/newbiedoc.sourceforge.net\/tutorials\/apt-get-intro\/info.html apt-cache search libapr apt-cache search &#8216;php.*sql&#8217; apt-cache search apache.\\*perl apt-cache search elvis\\|vim list the contents of a (not-installed) package see https:\/\/unix.stackexchange.com\/questions\/6311\/how-to-find-out-which-not-installed-package-a-file-belongs-to apt-file list [&hellip;]<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/adrhc.go.ro\/blog\/apt\/#more-3543\" class=\"more-link\">Continue reading &#10142; <span class=\"screen-reader-text\">APT (Advanced Package Tool)<\/span><\/a><\/div>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,11,33],"tags":[96],"class_list":["post-3543","post","type-post","status-publish","format-standard","hentry","category-commands","category-linux","category-ubuntu","tag-apt"],"_links":{"self":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/3543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/comments?post=3543"}],"version-history":[{"count":0,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/3543\/revisions"}],"wp:attachment":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/media?parent=3543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/categories?post=3543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/tags?post=3543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}