Simply the difference between how to match the package name.
Use yum remove as well as yum list and yum search.
For CentOS standard repositories, php* matches the following packages:
https://pkgs.org/search/?q=php
php-5.4.16-48.el7.x86_64.rpm
php-* matches the following packages:
php-bcmath-5.4.16-48.el7.x86_64.rpm
php-cli-5.4.16-48.el7.x86_64.rpm
php-common-5.4.16-48.el7.x86_64.rpm
php-dba-5.4.16-48.el7.x86_64.rpm
php-develop-5.4.16-48.el7.x86_64.rpm
php-embedded-5.4.16-48.el7.x86_64.rpm
php-enchant-5.4.16-48.el7.x86_64.rpm
php-fpm-5.4.16-48.el7.x86_64.rpm
php-gd-5.4.16-48.el7.x86_64.rpm
If you run "#yum remove php*", the argument does not match: php72_20221219.ini No packages are marked for deletion.
As mentioned in , it can be deployed in shell glob, so both are not suitable.
If you want to delete an existing PHP to update the PHP, use the
If phphph-hogehot-version.arch.rpm exists and you don't want to delete it, yum remove 'php-*' is more appropriate (this does not hit phphh), yum remove 'php*' is sufficient.
© 2025 OneMinuteCode. All rights reserved.