CentOS 中 yum update 与 yum upgrade 的区别
在 CentOS 系统中,yum upgrade
与 yum update
都会将系统包更新到最新版本。
通过 man yum
查询到的帮助信息如下:
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 specified match to packages which are not currently installed then update will not install them. update oper-
ates 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.
唯一不同是:yum upgrade
会删除旧版本的 package
,而 yum update
则会保留。注意!如果你的某些软件依赖旧版本的 package
,请使用 yum update
。
发表评论
文章归档
文章日历
2025 年 06 月 | ||||||
---|---|---|---|---|---|---|
日 | 一 | 二 | 三 | 四 | 五 | 六 |
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
文章标签
- Linux
- Go
- Yii
- 新浪
- CentOS
- PHP
- Git
- WSL
- Composer
- Mac
- 入职
- Bootstrap
- pyenv
- UCenter
- 厦门
- 出差
- 长沙
- 湖南卫视
- 微博
- Tengine
- YUI
- 泰国
- pecl
- 优化
- GitLab
- 迁移
- rootless
- 年会
- 生日
- Tengin
- RedHat
- Sphinx
- cygwin
- Windows
- Tmux
- Zsh
- 升级
- MySQL
- sql_mode
- Shadowsockets
- 面向对象
- HTTP
- 状态码
- grep
- unoconv
- PPT
- Nginx
- htpasswd
- golang
最新评论
-
崔亮 于 19-05-23 评论了Tengine 2.2.2 配置 http2 协议出现的坑
-
王媛 于 19-01-31 评论了Yii China 是官方唯一认可的中文社区
-
三杯蛙 于 19-01-24 评论了Go 语言中 json 的操作以及常见问题
-
三杯蛙 于 19-01-24 评论了新浪赴泰国曼谷和芭提雅团建
-
巡洋舰 于 18-09-05 评论了CentOS 安装 PHP7
-
小不点 于 11-03-02 评论了WordPress 如何控制每页显示的条数
-
白领厕工 于 10-12-22 评论了关于 phpMyAdmin 免输入用户名和密码,直接进入管理界面
-
清晨的欣赏 于 10-08-04 评论了PHP 5.4 的新特性
-
易赛官网 于 10-07-27 评论了PHP 5.4 的新特性
-
文秘之家 于 10-07-17 评论了PHP 5.4 的新特性
常用工具
- 时间戳转换
- URL ENCODE/DECODE
- JSON
- 正则测试
共 0 条评论