# yum repolist
Which generates the example output below (obviously depends on what repos you have installed):
repo id repo name
base CentOS-5 - Base
epel Extra Packages for Enterprise Linux 5 - x86_64
extras CentOS-5 - Extras
ius IUS Community Packages for Enterprise Linux 5 - x86_64
rpmforge RHEL 5 - RPMforge.net - dag
updates CentOS-5 - Updates
Then you can force yum to ignore all repos except the one you need (the IUS repo in this example) to list its available packages by issuing the following:
yum --disablerepo="*" --enablerepo="ius" list available
Which returns available packages that are only in that particular repo
Loaded plugins: fastestmirror, replace, security
Loading mirror speeds from cached hostfile
* ius: archive.linux.duke.edu
Excluding Packages in global exclude list
Finished
Available Packages
autoconf26x.noarch 2.63-4.ius.el5 ius
mysql50.x86_64 5.0.96-2.ius.el5 ius
mysql50-bench.x86_64 5.0.96-2.ius.el5 ius
mysql50-debuginfo.x86_64 5.0.96-2.ius.el5 ius
mysql50-devel.x86_64 5.0.96-2.ius.el5 ius
mysql50-server.x86_64 5.0.96-2.ius.el5 ius
mysql51.x86_64 5.1.63-1.ius.el5 ius
mysql51-bench.x86_64 5.1.63-1.ius.el5 ius
mysql51-debuginfo.x86_64 5.1.63-1.ius.el5 ius
mysql51-devel.x86_64 5.1.63-1.ius.el5 ius
mysql51-embedded.x86_64 5.1.63-1.ius.el5 ius
You can replace the yum option "list available" used above by any of yum's command options like update, install etc..
For example, installing the rsyslog package from the IUS repo:
yum --disablerepo="*" --enablerepo="ius" install rsyslog4
Loaded plugins: fastestmirror, replace, security
Loading mirror speeds from cached hostfile
* ius: archive.linux.duke.edu
Excluding Packages in global exclude list
Finished
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package rsyslog4.x86_64 0:4.8.0-1.ius.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================================
Installing:
rsyslog4 x86_64 4.8.0-1.ius.el5 ius 446 k
Transaction Summary
============================================================================================================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 446 k
Thanks, good post.
ReplyDeletethanks!
ReplyDeletethat was helpful
thank you!
ReplyDeletethanks!
ReplyDeleteAnd if you want to perform an update only for 2 specific repos, you would write :
yum --disablerepo="*" --enablerepo="epel,base" update
thanks!
ReplyDeleteAnd if you want to perform an update only for 2 specific repos, you would write :
yum --disablerepo="*" --enablerepo="epel,base" update