yum 命令 update 與 upgrade 的區別
阿新 • • 發佈:2018-12-26
man yum ,以及測試(centos 6.4版本)後,我認為,update 與 upgrade 並沒有實質性的區別。網上說:
yum -y update
升級所有包,改變軟體設定和系統設定,系統版本核心都升級
yum -y upgrade
升級所有包,不改變軟體設定和系統設定,系統版本升級,核心不改變
這是錯誤的!
update If run without any packages, update will update every currently installed package. If one or more packages or package globs are specified, Yum will only update the listed packages. While updating packages, yum will ensure that all dependencies are satisfied. (See Specifying package names for more information) If the packages or globs speci- fied match to packages which are not currently installed then update will not install them. update operates on groups, files, provides and filelists just like the "install" command. If the main obsoletes configure option is true (default) or the --obsoletes flag is present yum will include package obsoletes in its calculations - this makes it better for distro-version changes, for example: upgrading from somelinux 8.0 to somelinux 9. Note that "update" works on installed packages first, and only if there are no matches does it look for available packages. The difference is most noticeable when you do "update foo-1-2" which will act exactly as "update foo" if foo-1-2 is installed. You can use the "update-to" if you’d prefer that nothing happen in the above case.
upgrade
Is the same as the update command with the --obsoletes flag set. See update for more details.