Reinstall packages from a specific repository
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
The eus packages are apparently from Extended Update Support repositories: if it's important to keep your systems stay as RHEL 7.1 or 7.2 systems rather than automatically getting updated to 7.3 and above, then you might have a reason to use the EUS repositories, as they include backported bug fixes but no enhancements nor new features. Access to them requires either a premium RedHat subscription or an add-on subscription, so it can be an extra cost item.
The sjis packages, on the other hand, are related to Shift-JIS character set support. You only need them if you are processing text using the Japanese Shift-JIS character set.
Apparently some RedHat SKUs include access to the sjis repositories, and they may have been erroneously auto-activated at some point:
https://access.redhat.com/solutions/2768371
You also seem to have the "search-disabled-repos" Yum plugin, which seems to have some pitfalls according to the System Administrators Guide. You might want to disable it, or edit the /etc/yum/pluginconf.d/search-disabled-repos.conf configuration file to ignore the eus and sjis repositories entirely.
Hi Jörg,
If you want to use packages from rhel-7-server-rpms
only, this is the way you will have to reinstall the packages.
First remove the currently installed packages : sudo yum remove libdnet libicu libmspack net-tools sed
Then reinstall the wanted package versions : sudo yum install libdnet libicu libmspack net-tools sed
When you use the yum reinstall
command it doesn't work - because packages from disabled repos are installed.