Manjaro在滚动升级软件后,有时候会遇到个别软件升级后没法使用的状况,这个时候,须要作降级处理,还原到以前的旧版本。php
使用pacman安装的软件包若是没有特地删除,通常在/var/cache/pacman/pkg
目录下保存着以前的软件包。bash
$ ll | grep teamview -rw-r--r-- 1 root root 15893184 10月 18 03:41 teamviewer-13.2.26559-9-x86_64.pkg.tar.xz -rw-r--r-- 1 root root 24002620 11月 16 18:52 teamviewer-14.0.12762-9-x86_64.pkg.tar.xz -rw-r--r-- 1 root root 23999072 11月 23 18:55 teamviewer-14.0.14470-9-x86_64.pkg.tar.xz -rw-r--r-- 1 root root 15861156 1月 4 10:31 teamviewer-14.1.3399-9-x86_64.pkg.tar.xz
假如上面的teamview须要回滚到版本13,直接安装软件包便可:ide
$ sudo pacman -U teamviewer-13.2.26559-9-x86_64.pkg.tar.xz 正在加载软件包... 警告:正在降级软件包 teamviewer (14.1.3399-9 => 13.2.26559-9) 正在解析依赖关系... 正在查找软件包冲突... 软件包 (1) teamviewer-13.2.26559-9 所有安装大小: 59.27 MiB 净更新大小: -1.76 MiB :: 进行安装吗? [Y/n] y (1/1) 正在检查密钥环里的密钥 [####################################################] 100% (1/1) 正在检查软件包完整性 [####################################################] 100% (1/1) 正在加载软件包文件 [####################################################] 100% (1/1) 正在检查文件冲突 [####################################################] 100% (1/1) 正在检查可用存储空间 [####################################################] 100% :: 正在处理软件包的变化... (1/1) 正在降级 teamviewer [####################################################] 100% The Teamviewer daemon must be running for Teamviewer to work. Execute 'sudo systemctl enable teamviewerd' in a terminal. :: 正在运行事务后钩子函数... (1/4) Updating icon theme caches... (2/4) Reloading system manager configuration... (3/4) Arming ConditionNeedsUpdate... (4/4) Updating the desktop file MIME type cache...
这种方式更简单一些:使用downgrade函数
$ sudo downgrade teamviewer Downgrading from A.L.A. is disabled on the stable branch. To override this behavior, set DOWNGRADE_FROM_ALA to 1 . See https://wiki.manjaro.org/index.php?title=Using_Downgrade for more details. 可选的包: * 1) teamviewer-14.1.3399-9-x86_64.pkg.tar.xz (本地) * 2) teamviewer-14.0.14470-9-x86_64.pkg.tar.xz (本地) * 3) teamviewer-14.0.12762-9-x86_64.pkg.tar.xz (本地) * 4) teamviewer-13.2.26559-9-x86_64.pkg.tar.xz (本地) 输入数字以选择包:4 正在加载软件包... 警告:teamviewer-13.2.26559-9 已经为最新 -- 从新安装 正在解析依赖关系... 正在查找软件包冲突... 软件包 (1) teamviewer-13.2.26559-9 所有安装大小: 59.27 MiB 净更新大小: 0.00 MiB :: 进行安装吗? [Y/n] y (1/1) 正在检查密钥环里的密钥 [####################################################] 100% (1/1) 正在检查软件包完整性 [####################################################] 100% (1/1) 正在加载软件包文件 [####################################################] 100% (1/1) 正在检查文件冲突 [####################################################] 100% (1/1) 正在检查可用存储空间 [####################################################] 100% :: 正在处理软件包的变化... (1/1) 正在从新安装 teamviewer [####################################################] 100% The Teamviewer daemon must be running for Teamviewer to work. Execute 'sudo systemctl enable teamviewerd' in a terminal. :: 正在运行事务后钩子函数... (1/4) Updating icon theme caches... (2/4) Reloading system manager configuration... (3/4) Arming ConditionNeedsUpdate... (4/4) Updating the desktop file MIME type cache... 添加teamviewer到IgnorePkg? [y/n]y
第二种方式相比第一种,可以把软件放到更新忽略目录下,下次再更新,直接忽略掉。this