|
你可以运行 pacman -R kate 来删除一个包。这将会只删除这个包自身而不会去删除它的依赖包。
user@arch ~ $ sudo pacman -S kate-
checking dependencies...-
Packages (1) kate-18.04.2-2-
Total Removed Size: 20.30 MiB-
:: Do you want to remove these packages? [Y/n]
如果你想删除没有被其它包依赖的包,你可以运行 pacman -Rs:
user@arch ~ $ sudo pacman -Rs kate-
checking dependencies...-
Packages (7) editorconfig-core-c-0.12.2-1 kactivities-5.47.0-1 kparts-5.47.0-1 ktexteditor-5.47.0-2 syntax-highlighting-5.47.0-1 threadweaver-5.47.0-1 kate-18.04.2-2-
Total Removed Size: 38.91 MiB-
:: Do you want to remove these packages? [Y/n]
在笔者看来,Pacman 是搜索一个指定实用程序中的包名的最齐全的工具。如上所示,YUM 和 APT 都依赖于‘路径’去搜索到有用的结果,而 Pacman 则做了一些智能的猜测,它会去猜测你最有可能想搜索的包。
user@arch ~ $ sudo pacman -Fs updatedbcore/mlocate 0.26.git.20170220-1 usr/bin/updatedb-
user@arch ~ $ sudo pacman -Fs kateextra/kate 18.04.2-2 usr/bin/kate
使用 AUR
有很多流行的 AUR 包管理器助手。其中 yaourt 和 pacaur 颇为流行。不过,这两个项目已经被 Arch Wiki 列为“不继续开发以及有已知的问题未解决”。因为这个原因,这里直接讨论 aurman,除了会搜索 AUR 以及包含几个有帮助的(其实很危险)的选项之外,它的工作机制和 pacman 极其类似。从 AUR 安装一个包将会初始化包维护者的构建脚本。你将会被要求输入几次授权以便让程序继续进行下去(为了简短起见,笔者截断了输出)。
aurman -S telegram-desktop-bin~~ initializing aurman...~~ the following packages are neither in known repos nor in the aur...~~ calculating solutions...-
:: The following 1 package(s) are getting updated: aur/telegram-desktop-bin 1.3.0-1 -> 1.3.9-1-
?? Do you want to continue? Y/n: Y-
~~ looking for new pkgbuilds and fetching them...Cloning into 'telegram-desktop-bin'...-
remote: Counting objects: 301, done.remote: Compressing objects: 100% (152/152), done.remote: Total 301 (delta 161), reused 286 (delta 147)Receiving objects: 100% (301/301), 76.17 KiB | 639.00 KiB/s, done.Resolving deltas: 100% (161/161), done.?? Do you want to see the changes of telegram-desktop-bin? N/y: N-
[sudo] password for user:-
...==> Leaving fakeroot environment.==> Finished making: telegram-desktop-bin 1.3.9-1 (Thu 05 Jul 2018 11:22:02 AM EDT)==> Cleaning up...loading packages...resolving dependencies...looking for conflicting packages...-
Packages (1) telegram-desktop-bin-1.3.9-1-
Total Installed Size: 88.81 MiBNet Upgrade Size: 5.33 MiB-
:: Proceed with installation? [Y/n]
(编辑:92站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|