- 패키지에 따라 의존성 문제로 되돌릴 수 없는 경우가 발생 → 주의 필요
- 설정파일들은 패키지 설치/삭제 시 되돌리지 못할 수 있으므로 백업 필요
지금까지 설치한 yum 내용 확인
- yum 명령을 사용해서 패키지를 설치하거나 업데이트를 하면 ID가 하나씩 증가
- 각 항목의 세부사항을 알고 싶은면 info 옵션을 사용
$ yum history
Loaded plugins: fastestmirror
ID | Login user | Date and time | Action(s) | Altered
-------------------------------------------------------------------------------
47 | root | 2012-08-25 16:09 | Install | 1
46 | root | 2012-08-20 17:00 | Install | 1
45 | root | 2012-08-20 09:07 | Install | 1
44 | root | 2012-08-20 09:06 | Install | 3
43 | root | 2012-08-20 09:05 | Install | 8
42 | root | 2012-08-05 15:51 | Install | 1
41 | root | 2012-08-05 15:47 | Install | 1
40 | root | 2012-08-05 15:41 | Install | 2
39 | root | 2012-08-05 15:24 | Install | 1
38 | root | 2012-08-05 15:18 | Install | 1
37 | root | 2012-08-05 15:14 | Install | 3
36 | root | 2012-08-05 14:53 | I, U | 195 EE
35 | root | 2012-08-05 14:52 | Install | 3
34 | root | 2012-01-19 11:20 | I, U | 42 EE
33 | root | 2012-03-07 15:22 | Install | 8
32 | root | 2011-12-26 14:04 | Install | 1
31 | root | 2011-12-26 13:11 | Install | 18
30 | root | 2011-12-26 11:31 | Install | 1
29 | root | 2011-12-26 11:18 | Install | 12 EE
28 | root | 2011-12-21 17:59 | Install | 1
yum 명령을 사용해서 설치한 history의 세부 내용 출력
$ yum history info 47
Loaded plugins: fastestmirror
Transaction ID : 47
Begin time : Sat Aug 25 16:09:43 2012
Begin rpmdb : 586:e318ebe25b7f3c641234d8aec7f55b25e005ba00
End time : (0 seconds)
End rpmdb : 587:870ce250959935e6a5968fbb5928c1378daedda7
User : root
Return-Code : Success
Command Line : install dosfstools
Transaction performed with:
Installed rpm-4.8.0-27.el6.x86_64 @base
Installed yum-3.2.29-30.el6.centos.noarch @base
Installed yum-plugin-fastestmirror-1.1.30-14.el6.noarch @base
Packages Altered:
Install dosfstools-3.0.9-4.el6.x86_64 @base
history info
yum 명령어 실수로 rollback이 필요한 경우
- ID 47에서 46으로 되돌림
$ yum history rollback 46
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.tt.co.kr
* extras: centos.tt.co.kr
* updates: centoso4.centos.org
base | 3.7 kB 00:00
extras | 3.5 kB 00:00
nodejs-stable | 2.9 kB 00:00
updates | 3.5 kB 00:00
updates/primary_db | 4.0 MB 00:08
Rollback to transaction 46, from Mon Aug 20 17:00:17 2012
Undoing the following transactions: 47
Install dosfstools-3.0.9-4.el6.x86_64 @base
Resolving Dependencies
--> Running transaction check
---> Package dosfstools.x86_64 0:3.0.9-4.el6 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================
Package Arch Version Repository Size
=======================================================================
Removing:
dosfstools x86_64 3.0.9-4.el6 @base 197 k
Transaction Summary
=======================================================================
Remove 1 Package(s)
Installed size: 197 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : dosfstools-3.0.9-4.el6.x86_64 1/1
Verifying : dosfstools-3.0.9-4.el6.x86_64 1/1
Removed:
dosfstools.x86_64 0:3.0.9-4.el6
Complete!