CentOS 7.3.1611にphp7.0.20をアンインストールするメモ

# php -v
PHP 7.0.20 (cli) (built: Jun 7 2017 07:50:14) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
# yum remove php
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
–> Running transaction check
—> Package php.x86_64 0:7.0.20-1.el7.remi will be erased
–> Finished Dependency Resolution
base/7/x86_64 | 3.6 kB 00:00:00
extras/7/x86_64 | 3.4 kB 00:00:00
extras/7/x86_64/primary_db | 188 kB 00:00:00
remi-safe | 2.9 kB 00:00:00
updates/7/x86_64 | 3.4 kB 00:00:00
updates/7/x86_64/primary_db | 7.7 MB 00:00:00

Dependencies Resolved

===========================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================
Removing:
php x86_64 7.0.20-1.el7.remi @remi-php70 8.3 M

Transaction Summary
===========================================================================================================================
Remove 1 Package

Installed size: 8.3 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : php-7.0.20-1.el7.remi.x86_64 1/1
Verifying : php-7.0.20-1.el7.remi.x86_64 1/1

Removed:
php.x86_64 0:7.0.20-1.el7.remi

Complete!

# yum –enablerepo=remi-php70 remove php\*
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
–> Running transaction check
—> Package php-cli.x86_64 0:7.0.20-1.el7.remi will be erased
—> Package php-common.x86_64 0:7.0.20-1.el7.remi will be erased
—> Package php-fpm.x86_64 0:7.0.20-1.el7.remi will be erased
—> Package php-json.x86_64 0:7.0.20-1.el7.remi will be erased
—> Package php-mbstring.x86_64 0:7.0.20-1.el7.remi will be erased
—> Package php-mcrypt.x86_64 0:7.0.20-1.el7.remi will be erased
—> Package php-mysqlnd.x86_64 0:7.0.20-1.el7.remi will be erased
—> Package php-pdo.x86_64 0:7.0.20-1.el7.remi will be erased
—> Package php-pear.noarch 1:1.10.5-2.el7.remi will be erased
—> Package php-process.x86_64 0:7.0.20-1.el7.remi will be erased
—> Package php-xml.x86_64 0:7.0.20-1.el7.remi will be erased
–> Finished Dependency Resolution
remi-php70 | 2.9 kB 00:00:00

Dependencies Resolved

===========================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================
Removing:
php-cli x86_64 7.0.20-1.el7.remi @remi-php70 13 M
php-common x86_64 7.0.20-1.el7.remi @remi-php70 7.9 M
php-fpm x86_64 7.0.20-1.el7.remi @remi-php70 4.2 M
php-json x86_64 7.0.20-1.el7.remi @remi-php70 80 k
php-mbstring x86_64 7.0.20-1.el7.remi @remi-php70 2.8 M
php-mcrypt x86_64 7.0.20-1.el7.remi @remi-php70 89 k
php-mysqlnd x86_64 7.0.20-1.el7.remi @remi-php70 888 k
php-pdo x86_64 7.0.20-1.el7.remi @remi-php70 381 k
php-pear noarch 1:1.10.5-2.el7.remi @remi-php70 2.1 M
php-process x86_64 7.0.20-1.el7.remi @remi-php70 187 k
php-xml x86_64 7.0.20-1.el7.remi @remi-php70 854 k

Transaction Summary
===========================================================================================================================
Remove 11 Packages

Installed size: 32 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : 1:php-pear-1.10.5-2.el7.remi.noarch 1/11
Erasing : php-cli-7.0.20-1.el7.remi.x86_64 2/11
Erasing : php-process-7.0.20-1.el7.remi.x86_64 3/11
Erasing : php-xml-7.0.20-1.el7.remi.x86_64 4/11
Erasing : php-fpm-7.0.20-1.el7.remi.x86_64 5/11
warning: /etc/php-fpm.d/www.conf saved as /etc/php-fpm.d/www.conf.rpmsave
Erasing : php-mcrypt-7.0.20-1.el7.remi.x86_64 6/11
Erasing : php-mysqlnd-7.0.20-1.el7.remi.x86_64 7/11
Erasing : php-pdo-7.0.20-1.el7.remi.x86_64 8/11
Erasing : php-mbstring-7.0.20-1.el7.remi.x86_64 9/11
Erasing : php-json-7.0.20-1.el7.remi.x86_64 10/11
Erasing : php-common-7.0.20-1.el7.remi.x86_64 11/11
Verifying : php-pdo-7.0.20-1.el7.remi.x86_64 1/11
Verifying : php-common-7.0.20-1.el7.remi.x86_64 2/11
Verifying : php-mbstring-7.0.20-1.el7.remi.x86_64 3/11
Verifying : php-mysqlnd-7.0.20-1.el7.remi.x86_64 4/11
Verifying : 1:php-pear-1.10.5-2.el7.remi.noarch 5/11
Verifying : php-cli-7.0.20-1.el7.remi.x86_64 6/11
Verifying : php-mcrypt-7.0.20-1.el7.remi.x86_64 7/11
Verifying : php-xml-7.0.20-1.el7.remi.x86_64 8/11
Verifying : php-process-7.0.20-1.el7.remi.x86_64 9/11
Verifying : php-fpm-7.0.20-1.el7.remi.x86_64 10/11
Verifying : php-json-7.0.20-1.el7.remi.x86_64 11/11

Removed:
php-cli.x86_64 0:7.0.20-1.el7.remi php-common.x86_64 0:7.0.20-1.el7.remi php-fpm.x86_64 0:7.0.20-1.el7.remi
php-json.x86_64 0:7.0.20-1.el7.remi php-mbstring.x86_64 0:7.0.20-1.el7.remi php-mcrypt.x86_64 0:7.0.20-1.el7.remi
php-mysqlnd.x86_64 0:7.0.20-1.el7.remi php-pdo.x86_64 0:7.0.20-1.el7.remi php-pear.noarch 1:1.10.5-2.el7.remi
php-process.x86_64 0:7.0.20-1.el7.remi php-xml.x86_64 0:7.0.20-1.el7.remi

Complete!

 

# rpm -q php
package php is not installed

phpのバージョンを再度確認する
# php -v
-bash: /usr/bin/php: No such file or directory

Linux

Posted by arkgame