{"id":31,"date":"2021-09-08T21:02:20","date_gmt":"2021-09-08T13:02:20","guid":{"rendered":"https:\/\/www.weiqs.cn\/blog\/?p=31"},"modified":"2022-04-30T09:47:34","modified_gmt":"2022-04-30T01:47:34","slug":"b","status":"publish","type":"post","link":"https:\/\/www.weiqs.cn\/blog\/index.php\/2021\/09\/08\/b\/","title":{"rendered":"apt-get apt-cache\u547d\u4ee4\u7684\u4f7f\u7528"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>apt-get update                  # \u66f4\u65b0\u6e90  \r\napt-get upgrade                # \u66f4\u65b0\u6240\u6709\u5df2\u5b89\u88c5\u7684\u5305  \r\napt-get dist-upgrade          # \u53d1\u884c\u7248\u5347\u7ea7\uff08\u5982\uff0c\u4ece10.10\u523011.04\uff09  \r\n\r\napt-get install &lt;pkg>         # \u5b89\u88c5\u8f6f\u4ef6\u5305&lt;pkg>\uff0c\u591a\u4e2a\u8f6f\u4ef6\u5305\u7528\u7a7a\u683c\u9694\u5f00  \r\napt-get install --reinstall &lt;pkg> # \u91cd\u65b0\u5b89\u88c5\u8f6f\u4ef6\u5305&lt;pkg>  \r\napt-get install -f &lt;pkg>          # \u4fee\u590d\u5b89\u88c5\uff08\u7834\u635f\u7684\u4f9d\u8d56\u5173\u7cfb\uff09\u8f6f\u4ef6\u5305&lt;pkg>  \r\n\r\napt-get remove &lt;pkg>         # \u5220\u9664\u8f6f\u4ef6\u5305&lt;pkg>\uff08\u4e0d\u5305\u62ec\u914d\u7f6e\u6587\u4ef6\uff09  \r\napt-get purge &lt;pkg>           # \u5220\u9664\u8f6f\u4ef6\u5305&lt;pkg>\uff08\u5305\u62ec\u914d\u7f6e\u6587\u4ef6\uff09  \r\n\r\napt-cache stats                          # \u663e\u793a\u7cfb\u7edf\u8f6f\u4ef6\u5305\u7684\u7edf\u8ba1\u4fe1\u606f  \r\napt-cache search &lt;pkg>            # \u4f7f\u7528\u5173\u952e\u5b57pkg\u641c\u7d22\u8f6f\u4ef6\u5305  \r\napt-cache show   &lt;pkg_name>  # \u663e\u793a\u8f6f\u4ef6\u5305pkg_name\u7684\u8be6\u7ec6\u4fe1\u606f  \r\napt-cache depends &lt;pkg>       # \u67e5\u770bpkg\u6240\u4f9d\u8d56\u7684\u8f6f\u4ef6\u5305  \r\napt-cache rdepends &lt;pkg>      # \u67e5\u770bpkg\u88ab\u90a3\u4e9b\u8f6f\u4ef6\u5305\u6240\u4f9d\u8d56  \r\n\r\napt-get source &lt;pkg>              # \u4e0b\u8f7dpkg\u5305\u7684\u6e90\u4ee3\u7801\u5230\u5f53\u524d\u76ee\u5f55  \r\napt-get download &lt;pkg>            # \u4e0b\u8f7dpkg\u5305\u7684\u4e8c\u8fdb\u5236\u5305\u5230\u5f53\u524d\u76ee\u5f55  \r\napt-get source -d &lt;pkg>           # \u4e0b\u8f7d\u5b8c\u6e90\u7801\u5305\u540e\uff0c\u7f16\u8bd1  \r\napt-get build-dep   &lt;pkg>     # \u6784\u5efapkg\u6e90\u7801\u5305\u7684\u4f9d\u8d56\u73af\u5883\uff08\u7f16\u8bd1\u73af\u5883\uff1f\uff09  \r\napt-get clean                         # \u6e05\u9664\u7f13\u5b58(\/var\/cache\/apt\/archives\/{,partial}\u4e0b)\u4e2d\u6240\u6709\u5df2\u4e0b\u8f7d\u7684\u5305  \r\napt-get autoclean                 # \u7c7b\u4f3c\u4e8eclean\uff0c\u4f46\u6e05\u9664\u7684\u662f\u7f13\u5b58\u4e2d\u8fc7\u671f\u7684\u5305\uff08\u5373\u5df2\u4e0d\u80fd\u4e0b\u8f7d\u6216\u8005\u662f\u65e0\u7528\u7684\u5305\uff09  \r\napt-get autoremove              # \u5220\u9664\u56e0\u5b89\u88c5\u8f6f\u4ef6\u81ea\u52a8\u5b89\u88c5\u7684\u4f9d\u8d56\uff0c\u800c\u73b0\u5728\u4e0d\u9700\u8981\u7684\u4f9d\u8d56\u5305 <\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[7],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-technology-share","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.weiqs.cn\/blog\/index.php\/wp-json\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weiqs.cn\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weiqs.cn\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weiqs.cn\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weiqs.cn\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":1,"href":"https:\/\/www.weiqs.cn\/blog\/index.php\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"predecessor-version":[{"id":32,"href":"https:\/\/www.weiqs.cn\/blog\/index.php\/wp-json\/wp\/v2\/posts\/31\/revisions\/32"}],"wp:attachment":[{"href":"https:\/\/www.weiqs.cn\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weiqs.cn\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weiqs.cn\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}