Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1149770
  • 博文数量: 101
  • 博客积分: 110
  • 博客等级: 民兵
  • 技术积分: 1842
  • 用 户 组: 普通用户
  • 注册时间: 2012-08-24 13:26
个人简介

专注linux

文章分类

全部博文(101)

文章存档

2017年(2)

2016年(12)

2015年(17)

2014年(41)

2013年(27)

2012年(3)

分类: LINUX

2016-09-13 14:27:57

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
阅读(4649) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~