Unable to get rid of repo on Centos 7

6,692

Removing the configuration for the repository does not delete the packages you got from it, and those are the ones with broken dependencies.

CentOS warns forcefully that some third party repositories break the system by overwriting core packages. There are a few vetted repositories, checked (somewhat) not do cause terrible grief.

Delete the broken packages (yum delete broken-package), get rid of the extraofficial repositories (except for EPEL they really aren't under any close relation with CentOS proper). Then do a yum distro-sync and package-cleanup --problems to (hopefully) fix the breakage.

Share:
6,692

Related videos on Youtube

Sriram
Author by

Sriram

Interested in learning all that is out there!!

Updated on September 18, 2022

Comments

  • Sriram
    Sriram over 1 year

    I have a Centos 7 machine on which I am trying to install PHP 5.6 and associated binaries. For this purpose, I installed the epel and the remi repos. I also installed the webtatic repo which now is resulting in some broken dependencies. To resolve them, I removed the webtatic repo using:
    sudo yum remove webtatic-release-7-3.noarch and sudo yum clean all

    Both these commands have not yielded results because the dependency resolution is still broken:

    Error: Package: php56w-mysql-5.6.16-1.w7.x86_64 (@webtatic)
               Requires: php56w-pdo(x86-64)
               Removing: php56w-pdo-5.6.16-1.w7.x86_64 (@webtatic)
                   php56w-pdo(x86-64) = 5.6.16-1.w7
               Obsoleted By: php-pdo-5.6.17-1.el7.remi.x86_64 (remi-php56)
                   Not found
    Error: Package: php56w-opcache-5.6.16-1.w7.x86_64 (@webtatic)
               Requires: php56w-common(x86-64) = 5.6.16-1.w7
               Removing: php56w-common-5.6.16-1.w7.x86_64 (@webtatic)
                   php56w-common(x86-64) = 5.6.16-1.w7
               Obsoleted By: php-common-5.6.17-1.el7.remi.x86_64 (remi-php56)
                   Not found
    

    I have tried:
    1. Removing the webtatic.repo file from /etc/yum.repos.d/webtatic.repo
    2. Used rpm -e and various other variants to remove this repo.
    3. Tried to list the repo with sudo yum repolist all (this does not show webtatic as a repo).

    None of these approaches have worked.
    How do I remove the webtatic repo and get rid of this broken dependencies issue?

  • Sriram
    Sriram over 8 years
    When I do a sudo yum list installed | grep -i "brokenpackagename" or find it in sudo yum search, these return empty results...
  • Sriram
    Sriram over 8 years
    I just did a sudo yum remove <broken package name>. That resolved it! Phew!!! Why don't you add that to your answer and I will mark it correct? Thanks for all your help.