0

I got a problem when uninstall php-pgsql. it can't be remove.

[root@ip-172-31-31-52 /]# yum list php-pgsql\*
Loaded plugins: priorities, update-motd, upgrade-helper
Available Packages
php-pgsql.x86_64                   5.3.29-1.8.amzn1                    amzn-main

[root@ip-172-31-31-52 /]# yum remove php-pgsql\*
Loaded plugins: priorities, update-motd, upgrade-helper
No Match for argument: php-pgsql*
No Packages marked for removal

When i check the package is available but stil can't remove. Please help. Thank you

1 Answers1

0

If you look at the output of the list command, it shows that the php-pgsql.x86_64 is available, not installed on the machine. and that's why, when you hit the remove command, it shows that no packages marked for removal.

To support my answer, I had tried to run both of your command on ec2, and which does remove the package , if its installed.

Now if the plugin in installed on ec2 and you run list command , it shows the installed packages:

  [root@ip-xx-xxx-xx-xxx ec2-user]# yum list php-pgsql*
  Loaded plugins: priorities, update-motd, upgrade-helper
  Installed Packages -- this line shows it installed.
  php-pgsql.x86_64   

Try remove command to remove the packages:

[root@ip-xx-xxx-xx-xxx ec2-user]# yum remove php-pgsql* -y
Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package php-pgsql.x86_64 0:5.3.29-1.8.amzn1 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================================================================
 Package                                                 Arch                                                 Version                                                         Repository                                                Size
=============================================================================================================================================================================================================================================
Removing:
 php-pgsql                                               x86_64                                               5.3.29-1.8.amzn1                                                @amzn-main                                               315 k

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

Installed size: 315 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : php-pgsql-5.3.29-1.8.amzn1.x86_64                                                                                                                                                                                         1/1
  Verifying  : php-pgsql-5.3.29-1.8.amzn1.x86_64                                                                                                                                                                                         1/1

Removed:
  php-pgsql.x86_64 0:5.3.29-1.8.amzn1

Complete!
Sangam Belose
  • 4,262
  • 8
  • 26
  • 48