如何在不进行任何安装的情况下模拟Linux软件包升级(空运行)
时间:2020-01-09 10:38:03 来源:igfitidea点击:
问题描述:如何首先模拟升级以确认在Debian/Ubuntu Linux软件包管理下将要采取的措施是合理的?
解决方法:对于所有生产服务器而言,空运行都是一个好主意。
您可以打印通常会执行的操作,但实际上不执行它们。
这不需要root特权。
建议您首先模拟升级,以确认将要采取的措施是合理的。
可以通过发出以下命令来模拟升级:
# aptitude -s -y dist-upgrade
或者
$ sudo aptitude -s -y dist-upgrade
输出示例:
aptitude -s -y dist-upgrade Reading package lists... Done Building dependency tree... Done Reading extended state information Initializing package states... Done Reading task descriptions... Done Building tag database... Done The following packages are unused and will be REMOVED: libgssapi2 The following packages will be upgraded: libpcre3 1 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded. Need to get 0B/199kB of archives. After unpacking 119kB will be freed. Would download/install/remove packages.