From 642365ab551c78238ddbd5407e06729ddaf28b8e Mon Sep 17 00:00:00 2001 From: "rick.chan" Date: Wed, 20 Jan 2021 14:52:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=20Pacman=20=E8=A1=A5=E5=85=85=20Query?= =?UTF-8?q?=20=E6=96=B9=E6=B3=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: rick.chan --- Software/Applications/Pacman/Pacman.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Software/Applications/Pacman/Pacman.md b/Software/Applications/Pacman/Pacman.md index 3b22cea..6898028 100644 --- a/Software/Applications/Pacman/Pacman.md +++ b/Software/Applications/Pacman/Pacman.md @@ -20,7 +20,17 @@ pacman -S pacman -S --force ``` -## 3.Remove +## 3.Query + +```bash +pacman -Qs +# list installed packages only found in sync db(s) [filter] +pacman -Qen +# list installed packages not found in sync db(s) [filter] +pacman -Qem +``` + +## 4.Remove 卸载命令和常用参数如下: @@ -32,7 +42,7 @@ $ pacman -Rscun -u, --unneeded remove unneeded packages ``` -## 4.Refresh Package Databases +## 5.Refresh Package Databases 长时间不进行更新的话本地 package databases 会与远程的不一致,导致安装软件时出现: @@ -46,7 +56,7 @@ error: failed retrieving file pacman -Syu ``` -## 5.Update +## 6.Update 使用如下命令升级软件包和系统。 @@ -54,7 +64,7 @@ pacman -Syu pacman -Syu ``` -## 6.从本地文件安装 +## 7.从本地文件安装 使用如下命令可以从本地“\*.pkg.tar.xz”(2020年1月份以后改为 “\*.pkg.tar.zst”)文件进行安装: @@ -62,9 +72,9 @@ pacman -Syu pacman {-U --upgrade} [选项] <文件> ``` -## 7.问题处理 +## 8.问题处理 -### 7.1.conflicting files +### 8.1.conflicting files 在升级或安装软件包时经常遇到如下错误: