Reinstall packages from a specific repository

Latest response

Today, I looked on one of my hosts to see if there are any packages installed that are not from 'rhel-7-server-rpms' or 'anaconda'. And surprise, there are for of them:

# yum list installed | grep -v "rhel-7-server-rpms\|anaconda"
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Installed Packages
NetworkManager-config-server.x86_64
Red_Hat_Enterprise_Linux-Release_Notes-7-en-US.noarch
libdnet.x86_64                   1.12-13.1.el7               @rhel-7-server-eus-rpms
libicu.x86_64                    50.1.2-15.el7               @rhel-7-server-eus-rpms
libmspack.x86_64                 0.5-0.4.alpha.el7           @rhel-7-server-eus-rpms
net-tools.x86_64                 2.0-0.17.20131004git.el7    @rhel-7-server-eus-rpms
sed.x86_64                       4.2.2-5.el7.sjis.1          @rhel-sjis-for-rhel-7-server-eus-rpms
# yum repolist enabled
Loaded plugins: product-id, search-disabled-repos, subscription-manager
repo id                                                                                      repo name                                                                                            status
rhel-7-server-rpms/7Server/x86_64                                                            Red Hat Enterprise Linux 7 Server (RPMs)                                                             14,280
repolist: 14,280

I would like to use packages from 'rhel-7-server-rpms' only. Is it a problem that there are packages from other repos installed that are not available anymore?

If there is an update for one of these packages available in 'rhel-7-server-rpms', will the packages from 'rhel-7-server-eus-rpms' or 'rhel-sjis-for-rhel-7-server-eus-rpms' be updated automatically? Is there any way to reinstall these packages from 'rhel-7-server-rpms'? The reinstall subcommand exits with an error:

# yum reinstall sed
Loaded plugins: product-id, search-disabled-repos, subscription-manager
rhel-7-server-rpms                                                                                                                                                               | 3.5 kB  00:00:00
Installed package sed-4.2.2-5.el7.sjis.1.x86_64 (from rhel-sjis-for-rhel-7-server-eus-rpms) not available.
Error: Nothing to do

Thanks in advance for your thoughts and advice.

Regards,
Joerg

Responses