You may reading link below :
- How to reset root password on centos 7
- Generate and Verify Files with MD5 Checksum in Linux
- use inotify-tools on centos
- awk useful commands examples
How to Downgrade Upgrade package use yum command
The basic syntax Downgrade package
yum downgrade package1showing multiple versions of a package
yum downgrade package1 package2
yum --showduplicates list packageFor example
How to Downgrade php-fpm 7.0.21 roll-back php-fpm 5.3.3
yum downgrade php-fpmThe output as bellow
Resolving DependenciesDue to, the package php-fpm dependency with php-common, your downgrade the package php-fpm and php-common.
--> Running transaction check
---> Package php-fpm.x86_64 0:7.0.20-1.el6.remi will be a downgrade
--> Processing Dependency: php-common(x86-64) = 7.0.20-1.el6.remi for package: php-fpm-7.0.20-1.el6.remi.x86_64
---> Package php-fpm.x86_64 0:7.0.21-1.el6.remi will be erased
--> Finished Dependency Resolution
Error: Package: php-fpm-7.0.20-1.el6.remi.x86_64 (remi-php70)
Requires: php-common(x86-64) = 7.0.20-1.el6.remi
Installed: php-common-7.0.21-1.el6.remi.x86_64 (@remi-php70)
php-common(x86-64) = 7.0.21-1.el6.remi
Available: php-common-5.3.3-49.el6.x86_64 (base)
php-common(x86-64) = 5.3.3-49.el6
Available: php-common-7.0.20-1.el6.remi.x86_64 (remi-php70)
php-common(x86-64) = 7.0.20-1.el6.remi
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
yum downgrade php-fpm php-commonThe method another, you can downgrade the all package php.
yum downgrade $(rpm -qa --queryformat="%{name} \n" |grep ^php)if the during downgrade, the package dependency remi repo, your disable remi repo before downgrade the package.
yum-config-manager --disable remi-php70
How to upgrade the package use yum command
The basic syntax
yum update package1For example, how to upgrade php-fpm 5.3.3 to php-fpm 7.0.21
yum update package1 package2
yum update php-fpm php-mysql --enablerepo=remi-php70How to List installed packages with YUM
yum list installed | egrep php
How to roll back an update using yum command? How to Roll-back package
yum historyThe output as bellow
ID | Login user | Date and time | Action(s) | AlteredRoll-back the package with ID 8
-------------------------------------------------------------------------------
12 | <huupv> | 2017-07-20 15:42 | I, O, U | 9 <
11 | <huupv> | 2017-07-20 14:46 | Install | 18 >
10 | <huupv> | 2017-07-20 11:06 | Install | 1
9 | <huupv> | 2017-07-20 10:51 | Install | 1
8 | <huupv> | 2017-07-20 10:46 | Install | 4
7 | <huupv> | 2017-07-20 10:44 | Install | 16
6 | <huupv> | 2017-07-20 10:40 | Install | 4
5 | <huupv> | 2017-07-20 10:38 | Install | 5
4 | <huupv> | 2017-07-20 10:38 | Install | 1
3 | root <root> | 2017-07-20 09:30 | Install | 241
2 | root <root> | 2017-07-20 09:28 | I, U | 98 EE
1 | System <unset> | 2017-07-20 09:20 | Install | 205
yum history
yum history info 8
yum history undo 8
The conclusion
To use yum command to Downgrade/ Upgrade or Rollback the package on CentOS/RHEL system
Thanks for reading CentOS/RHEL Use yum Command To Downgrade Upgrade or Rollback Updates My blog Zimbra Mail Server,linux,bash script,centos,linux command I hope this is useful.