yum或rpm回退方法

7200阅读 0评论2015-01-16 我为鹤狂
分类:LINUX

1. Add tsflags=repackage to /etc/yum.conf.

2. Add %_repackage_all_erasures 1 to /etc/rpm/macros. If /etc/rpm/macros does not exist, just create it.

3. You can now install, erase and update packages with yum and/or rpm, and they will save roll back information.

4. When you want to roll back, use rpm to do so.
You do this by specifying the --rollback switch and a date/time, like the examples below:

rpm -Uhv --rollback '19:00'
rpm -Uhv --rollback '8 hours ago'
rpm -Uhv --rollback 'december 31'
rpm -Uhv --rollback 'yesterday'


5. 如果想回退某个package,可以使用下面的命令

rpm -Uvh --oldpackage sendmail-8.13.8-2.el5.x86_64.rpm
上一篇:Linux统计某文件夹下文件、文件夹的个数
下一篇:linux找不到动态链接库 .so文件的解决方法