如何降级ubuntu的包
时间:2020-03-21 11:44:18 来源:igfitidea点击:
降级在Ubuntu中的软件包
出于本教程的目的,我将降级Firefox包。
让我们查看当前安装的Firefox版本。
如上所述,我的Firefox版本是50。
例如,我想将此Firefox版本下调到其较低的版本:45.
我怎样才能做到这一点?
这就是你今天要学习的东西。
但等等,我不知道存储库中的可用旧版本,我该如何找到它?
从终端运行命令以列出存储库中的可用版本。
$sudo apt-cache showpkg firefox
上面的命令将显示可用的Firefox版本。
让我们降级Firefox版本到45.这样做,运行:
$sudo apt-get install firefox=45.0.2+build1-0ubuntu1
键入"Y"并按Enter键。
示例输出:
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: fonts-lyx The following packages will be DOWNGRADED: firefox 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 332 not upgraded. Need to get 43.2 MB of archives. After this operation, 6,519 kB disk space will be freed. Do you want to continue? [Y/n] y Get:1 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 firefox amd64 45.0.2+build1-0ubuntu1 [43.2 MB] Fetched 43.2 MB in 2min 43s (263 kB/s) dpkg: warning: downgrading firefox from 50.0+build2-0ubuntu0.16.04.2 to 45.0.2+build1-0ubuntu1 (Reading database ... 224874 files and directories currently installed.) Preparing to unpack .../firefox_45.0.2+build1-0ubuntu1_amd64.deb ... Unpacking firefox (45.0.2+build1-0ubuntu1) over (50.0+build2-0ubuntu0.16.04.2) ... Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20150523-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for desktop-file-utils (0.22-1ubuntu5) ... Processing triggers for gnome-menus (3.13.3-6ubuntu3) ... Processing triggers for mime-support (3.59ubuntu1) ... Processing triggers for man-db (2.7.5-1) ... Setting up firefox (45.0.2+build1-0ubuntu1) ... Please restart all running instances of firefox, or you will experience problems.
注意:我们应该完全提及上面命令中所示的版本。
如果有任何拼写错误,则此命令不会降级包,并将显示存储库中没有此类包。
重新启动所有正在运行的firefox实例。
现在,我们将看到Firefox已被降级为旧版本。
或者,我们可以使用命令从终端检查Firefox版本:
$sudo apt-cache show firefox | grep Version