升级到15.4 apt-get upgrade 和 apt-get dist-upgrade 的区别
Tofloor
poster avatar
wangyingtao
deepin
2017-04-20 21:37
Author
出问题的同学大部分都是用upgrade升级上来的,这两个命令还是有区别的。
如果不明白,通过控制中心升级到15.4是最安全的方法

https://askubuntu.com/questions/81585/what-is-dist-upgrade-and-why-does-it-upgrade-more-than-upgrade


upgrade   upgrade is used to install the newest versions of all packages   currently installed on the system from the sources enumerated in   /etc/apt/sources.list. Packages currently installed with new   versions available are retrieved and upgraded; under no   circumstances are currently installed packages removed, or packages   not already installed retrieved and installed. New versions of   currently installed packages that cannot be upgraded without   changing the install status of another package will be left at   their current version. An update must be performed first so that   apt-get knows that new versions of packages are available.
dist-upgrade   dist-upgrade in addition to performing the function of upgrade,   also intelligently handles changing dependencies with new versions   of packages; apt-get has a "smart" conflict resolution system, and   it will attempt to upgrade the most important packages at the   expense of less important ones if necessary. So, dist-upgrade   command may remove some packages. The /etc/apt/sources.list file   contains a list of locations from which to retrieve desired package   files. See also apt_preferences(5) for a mechanism for overriding   the general settings for individual packages.
And with the newer apt tool available from 14.04 onwards:
full-upgrade   full-upgrade performs the function of upgrade but may also remove   installed packages if that is required in order to resolve a   package conflict.

Reply Favorite View the author
All Replies
avatar
158******63
deepin
2017-04-20 21:56
#1
如果把这些内容拆成字母的话,我应该都认识
Reply View the author
avatar
leixiaozeng
deepin
2017-04-20 22:04
#2
https://bbs.deepin.org/post/138004
如果把这些内容拆成字母的话,我应该都认识

嗯,我也是
Reply View the author
avatar
qiyzr
deepin
2017-04-20 22:08
#3
跨版本升级肯定是dist-upgrade,当然用深度控制中心最稳妥。除非是Arch,openSUSE那样的滚动发行版,一个命令就可以升级最新系统,不需要区分。
Reply View the author
avatar
兴安
deepin
2017-04-20 22:10
#4
级是用来安装当前安装从/etc/apt/sources.list中所列的源系统上的所有包的最新版本。目前可用的检索和升级的新版本安装包; 目前,在没有安装的情况下包装中取出,或包尚未安装检索和安装。不能在不改变其他包的安装状态升级已安装的软件包的新版本将在目前的版本不留。所以apt-get所知道的包有新的版本的更新,必须首先执行。
此外DIST升级的dist-升级进行升级的功能,还能智能处理与包装的新版本改变的依赖; apt-get的具有“智能”解决冲突的制度,它会试图在不太重要的,如果有必要的费用升级最重要的软件包。所以,DIST升级命令可能会删除一些软件包。/etc/apt/sources.list文件包含从中检索所需的包文件位置的列表。也请参考apt_preferences(5)用于覆盖单个包装的常规设置的机制。
并用新的容易从14.04开始的工具:
全升级全升级进行升级的功能,但如果是为了解决一个包冲突需要也可以删除已安装的软件包。
Reply View the author
avatar
comzhong
deepin
2017-04-20 22:16
#5
upgrade:系统将现有的Package升级,如果有相依性的问题,而此相依性需要安装其它新的Package或影响到其它Package的相依性时,此Package就不会被升级,会保留下来.

dist-upgrade:可以聪明的解决相依性的问题,如果有相依性问题,需要安装/移除新的Package,就会试着去安装/移除它.
(所以通常这个会被认为是有点风险的升级)

apt-get upgrade 和 apt-get dist-upgrade 本质上是没有什么不同的。

只不过,dist-upgrade
会识别出当依赖关系改变的情形并作出处理,而upgrade对此情形不处理。

例如软件包 a 原先依赖 b c d,但是在源里面可能已经升级了,现在是 a 依赖 b c e。
这种情况下,dist-upgrade 会删除 d 安装 e,并把 a 软件包升级,而 upgrade 会认为依赖关系改变而拒绝升级 a 软件包。
Reply View the author
avatar
wangyingtao
deepin
2017-05-07 04:48
#6
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
顶贴
Reply View the author