Softpanorama

Home Switchboard Unix Administration Red Hat TCP/IP Networks Neoliberalism Toxic Managers
May the source be with you, but remember the KISS principle ;-)
Bigger doesn't imply better. Bigger often is a sign of obesity, of lost control, of overcomplexity, of cancerous cells

YUM

News RPM Recommended Links Reference Yum's repository system How to add a new yum repository Registering a server using Red Hat Subscription Manager (RHSM)
Yum proxy configuration How to download RPMs with yum Download Dependencies for a RPM Yum history Managing YUM Caches Setting Up a yum Repository  
Curl EPEL repository How to Enable EPEL Repository Yum Plugins Red Hat RPM hell  
Smart Pirut Yast Horror Stories Unix History Humor Etc

Introduction

RPM The Yellow Dog Updater, Modified (YUM) was written at the Duke University department of Physics and is currently being maintained by Seth Vidal, who now works for Red Hat) and Michael Stenner, both of Duke University, as part of Duke University's Linux@DUKE project.

Yum is a rewrite in Python of its predecessor tool, Yellowdog Updater (YUP). The latter was originally written and maintained by Dan Burcaw, Bryan Stillwell, Stephen Edie, and Troy Bengegerdes of Yellowdog Linux (an RPM-based Linux distribution that runs on Macintoshes ).

YUM is a command line utility. There are also a couple of graphical frontends to yum:

There is also pup: graphical front-end for installing software updates, installed by default in Red Hat and its derivatives.

Yum is a very powerful tool for working with RPM packages organized into repositories. But it is pretty complex and road to hell is paved with good intentions. Now yum creates its own set of complex to debug bugs, especially if you work over the proxy.

Like any package manages is can do basic this like to display the list of installed and available for installation RPMs, extract and publish information from the RPM headers based on keywords or globs, find packages that provide particular files. But it can also do some not so basic operations. Yum is therefore of a higher level, more convenient tool them rpm. Yum can be used to synchronize already tested updates for multiple Linux servers or desktops. It this case it can be run from iether some parrale execution tool like cexec (tupically this is done for HPC clusters), or via some kind of  cron or at script that picks up data from common NFS system or particular directory update by rsync. 

Since RHEL5  Red Hat uses YUM as the default method for updating and installing RPM packages.   Automatic software update can be done with either the yum-updatesd  or the yum-updateonboot packages.

Yum's "intelligence" in performing updates is superior to most competitors (only smart comes close). But often it is not enough. It also creates complex bugs when higher level version of some package is installed.

Basic usage

Unlike typical unix utilities yum accepts options that are keywords without "-" sign in front. Classic unix utilities accept two type of options: a long option (features two hyphens and descriptive word) and a short option (with one hyphen and -- in most cases -- the first character of the full option). Yum is abnormal in this respect. In this respect yum is different from rpm which adhere to Unix conventions (i.e. either rpm --install [name]  or rpm -i [name]).

Silent operation, without prompts

If you use yum on a remote server sometimes it is important to block any prompts. There are several options for that

Usually specifying -y is enough, for example

ssh b9 yum -y update

RPM package Names

RPM packages are named in the following way:

package_name-version-release.architecture.rpm 

package_name is the name of the package. For example, you saw how to install the php package earlier. version is the version of the software that the package contains. release is the CentOS release number.

Most packages are version locked, whereas the release changes as patches are added.

Architecture is what type of hardware the package is compiled to run on. For the vast majority of people, the architectures of interest are:

If you’re working with Yum and the standard repositories, you won’t need to do much with either architecture or version because Yum will make the correct choices for you. However, knowing how the packages are put together will let you search for specific versions and give you the option of manually locating and installing a file.

Searching for Packages

Yum has a sophisticated search facility that will allow you to find pretty much any package across your repositories. The key to actually finding a specific package, though, requires a more in-depth knowledge on how RPM packages are named—specifically, how the version numbers work.

Showing a package's dependencies

Installing a Group of Packages

YUM  has the ability to install groups of packages. Which if you have a prove repository you can create yourself. This is really useful because many tasks require a collection of different software that may on first glance not look at all related.  There are too types of packages in the group: mandatory and optional.  Yum installs only those packages that are marked as mandatory. This is normally fine because it usually installs all of the key packages, but if you find it didn’t install what you’re looking for, you can still install any missing packages individually. To find out what groups are available (and also which ones you have already installed), you use the following:

yum grouplist

One of the groups that sysadmins tend to use a lot is Virtualization. This group contains all the packages you need such as the Xen kernel, support libraries, and administration tools.

To get information about the group including the list of packages use

yum groupinfo Virtualization

To install a group, you use the groupinstall command:

yum groupinstall Virtualization

If the group you want to install has a space in the name, enclose it in quotes:

yum groupinstall "Yum Utilities"

As with installing packages, Yum will present you with a list of packages that it needs to download and install in order to fulfill your request.

Classic example of using this capability is installing X11, if you missed it during the initial install:

yum -y groupinstall "X Window System" "Desktop" "Fonts" "General Purpose Desktop"

To remove all packages, of any type, in the named group use groupremove.

yum groupremove groupname

It will also remove any package that depends on any of these packages.

There is also yum-groups-manager which allows to create groups in the YUM repository. See manpage at yum-groups-manager(1) - Linux man page


Top Visited
Switchboard
Latest
Past week
Past month

NEWS CONTENTS

Old News ;-)

[Nov 09, 2018] Resolving YUM: Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast by Sahil Suri

Nov 09, 2018 | www.linuxnix.com

Introduction

We've explored the yum package manager for RHEL based systems extensively in previous yum . In this article, we will present the cause and fix for the message "Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast" which you might occassionally come across while running yum commands.

Cause of the message

YUM maintains a cache of repository related information in the /var/cache/yum/$basearch/$releasever/ directory, where $basearch and $releasever are Yum variables referring to base architecture of the system and the release version of Red Hat Enterprise Linux. Along with some metadata yum also stores downloaded packages temporarily in this location while the packages are being installed. Once the packages are installed successfully they are removed from the cache directories. If you are working on a server that has not been able to connect to an active yum repository server for several weeks then you will see this message when you run a yum command indicating the presence of outdated repository entries in the yum cache.This basically means that the yum cache directory is not up to date.

[root@linuxnix ~]# yum install zip
Loaded plugins: fastestmirror, langpacks
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast

The old repodata warning also gets triggered if you restore from an old server snapshots for those using VPS servers or cloud servers. It is merely a warning that you may not be getting the current version of programs for your webserver.

Fix for the message:

You can get rid of this message via one of the following two methods.

Method 1; Yum clean all
To clean the yum cache entirely and recreate it execute the following command:

[root@linuxnix ~]# yum clean all
Loaded plugins: fastestmirror, langpacks
Cleaning repos: base epel extras puppetlabs-pc1 updates
Cleaning up everything
Cleaning up list of fastest mirrors
[root@linuxnix ~]#

After running this command, when you run the next yum related command then it will populate the yum cache again, you will no longer see the "Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast" since yum will now have access to the latest repository metadata in the yum cache.

Method 2: Yum makecache fast
The yum cache will be automatically built up over time when you perform various yum queries such as installing or updating packages, however we have the option to manually make the cache so that future actions will be quicker with the 'makecache' argument. By adding the keyword fast to the end of the yum makecache command will make it populate the yum cache even faster but will end up caching fewer repositories.

[root@linuxnix ~]# yum makecache fast
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00:00
epel/x86_64/metalink | 5.3 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 3.4 kB 00:00:00
puppetlabs-pc1 | 2.5 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/8): base/7/x86_64/group_gz | 166 kB 00:00:05
(2/8): extras/7/x86_64/primary_db | 186 kB 00:00:03
(3/8): puppetlabs-pc1/x86_64/primary_db | 184 kB 00:00:03
(4/8): epel/x86_64/group_gz | 88 kB 00:00:13
(5/8): epel/x86_64/updateinfo | 938 kB 00:00:22
(6/8): base/7/x86_64/primary_db | 5.9 MB 00:00:48
(7/8): epel/x86_64/primary | 3.6 MB 00:01:40
(8/8): updates/7/x86_64/primary_db | 5.2 MB 00:01:57
Determining fastest mirrors
* base: centos.mirror.snu.edu.in
* epel: mirror01.idc.hinet.net
* extras: mirrors.nhanhoa.com
* updates: mirrors.viethosting.com
epel 12661/12661
Metadata Cache Created
[root@linuxnix ~]#

Aside from the two methods described above we could also use yum-cron to regularly refresh the yum cache. The yum-cron package provides a convenient way to check for, download and apply updates automatically.The cron jobs from the yum-cron package are active immediately after installing the package and there's no extra configuration necessary. The job will be run when daily cron jobs are set to run.

[Nov 08, 2018] How to remove all installed dependent packages while removing a package in centos 7?

Aug 16, 2016 | unix.stackexchange.com

ukll , Aug 16, 2016 at 15:26

I am kinda new to Linux so this may be a dumb question. I searched both in stackoverflow and google but could not find any answer.

I am using CentOS 7. I installed okular, which is a PDF viewer, with the command:

sudo yum install okular

As you can see in the picture below, it installed 37 dependent packages to install okular.

But I wasn't satisfied with the features of the application and I decided to remove it. The problem is that if I remove it with the command:

sudo yum autoremove okular

It only removes four dependent packages.

And if I remove it with the command:

sudo yum remove okular

It removes only one package which is okular.x86_64.

Now, my question is that is there a way to remove all 37 installed packages with a command or do I have to remove all of them one by one?

Thank you in advance.

Jason Powell , Aug 16, 2016 at 17:25

Personally, I don't like yum plugins because they don't work a lot of the time, in my experience.

You can use the yum history command to view your yum history.

[root@testbox ~]# yum history
Loaded plugins: product-id, rhnplugin, search-disabled-repos, subscription-manager, verify, versionlock
ID     | Login user               | Date and time    | Action(s)      | Altered
----------------------------------------------------------------------------------
19 | Jason <jason>  | 2016-06-28 09:16 | Install        |   10

You can find info about the transaction by doing yum history info <transaction id> . So:

yum history info 19 would tell you all the packages that were installed with transaction 19 and the command line that was used to install the packages. If you want to undo transaction 19, you would run yum history undo 19 .

Alternatively, if you just wanted to undo the last transaction you did (you installed a software package and didn't like it), you could just do yum history undo last

Hope this helps!

ukll , Aug 16, 2016 at 18:34

Firstly, thank you for your excellent answer. And secondly, when I did sudo yum history , it showed only actions with id 30 through 49. Is there a way to view all actions history (including with id 1-29)? – ukll Aug 16 '16 at 18:34

Jason Powell , Aug 16, 2016 at 19:00

You're welcome! Yes, there is a way to show all of your history. Just do yum history list all . – Jason Powell Aug 16 '16 at 19:00

,

yum remove package_name will remove only that package and all their dependencies.

yum autoremove will remove the unused dependencies

To remove a package with it's dependencies , you need to install yum plugin called: remove-with-leaves

To install it type:

yum install yum-plugin-remove-with-leaves

To remove package_name type:

yum remove package_name --remove-leaves

[Nov 01, 2018] How Do We Find Out The Installed Packages Came From Which Repository

Nov 01, 2018 | www.2daygeek.com

How Do We Find Out The Installed Packages Came From Which Repository on RHEL/CentOS Systems?

This can be done in multiple ways. Here we will be giving you all the possible options and you can choose which one is best for you.

Method-1: Using Yum Command

... ... ...

yum info apachetop

[Oct 12, 2018] How To List The Enabled-Active Repositories In Linux

Oct 12, 2018 | www.2daygeek.com

RHEL based systems are mainly offering the below three major repositories. These repository will be enabled by default.

# yum repolist
or
# yum repolist enabled

Loaded plugins: fastestmirror
Determining fastest mirrors
 * epel: ewr.edge.kernel.org
repo id                                                                      repo name                                                                                                 status
!base/7/x86_64                                                               CentOS-7 - Base                                                                                            9,911
!epel/x86_64                                                                 Extra Packages for Enterprise Linux 7 - x86_64                                                            12,687
!extras/7/x86_64                                                             CentOS-7 - Extras                                                                                            403
!updates/7/x86_64                                                            CentOS-7 - Updates                                                                                         1,348
repolist: 24,349
How To List The Enabled Repositories on Fedora

DNF stands for Dandified yum. We can tell DNF, the next generation of yum package manager (Fork of Yum) using hawkey/libsolv library for backend. Aleš Kozumplík started working on DNF since Fedora 18 and its implemented/launched in Fedora 22 finally.

Dnf command is used to install, update, search & remove packages on Fedora 22 and later system. It automatically resolve dependencies and make it smooth package installation without any trouble.

Yum replaced by DNF due to several long-term problems in Yum which was not solved. Asked why ? he did not patches the Yum issues. Aleš Kozumplík explains that patching was technically hard and YUM team wont accept the changes immediately and other major critical, YUM is 56K lines but DNF is 29K lies. So, there is no option for further development, except to fork.

Suggested Read : DNF (Fork of YUM) Command To Manage Packages on Fedora System

Fedora system is mainly offering the below two major repositories. These repository will be enabled by default.

# dnf repolist
or
# dnf repolist enabled

Last metadata expiration check: 0:02:56 ago on Wed 10 Oct 2018 06:12:22 PM IST.
repo id                                         repo name                                                        status
docker-ce-stable                                Docker CE Stable - x86_64                                             6
*fedora                                         Fedora 26 - x86_64                                               53,912
home_mhogomchungu                               mhogomchungu's Home Project (Fedora_25)                              19
home_moritzmolch_gencfsm                        Gnome Encfs Manager (Fedora_25)                                       5
mystro256-gnome-redshift                        Copr repo for gnome-redshift owned by mystro256                       6
nodesource                                      Node.js Packages for Fedora Linux 26 - x86_64                        83
rabiny-albert                                   Copr repo for albert owned by rabiny                                  3
*rpmfusion-free                                 RPM Fusion for Fedora 26 - Free                                     536
*rpmfusion-free-updates                         RPM Fusion for Fedora 26 - Free - Updates                           278
*rpmfusion-nonfree                              RPM Fusion for Fedora 26 - Nonfree                                  202
*rpmfusion-nonfree-updates                      RPM Fusion for Fedora 26 - Nonfree - Updates                         95
*updates                                        Fedora 26 - x86_64 - Updates                                     14,595

[Dec 06, 2017] rpm - yum error Cannot retrieve metalink for repository epel. Please verify its path and try again updating ContextBroker -

Dec 06, 2017 | stackoverflow.com

JosepB ,Nov 4, 2014 at 12:08

I'm trying to update Orion ContextBroker using the command yum install contextBroker. Unfortunatelly I get the following error:

Loaded plugins: fastestmirror, refresh-packagekit, security Loading

mirror speeds from cached hostfile

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

What could be going wrong ?

fgalan ,Nov 4, 2014 at 12:51

I solved this issue editing both /etc/yum.repos.d/epel.repo and /etc/yum.repos.d/epel-testing.repo files, commenting all entries starting with mirrorlist=... and uncommenting all the entries starting with baseurl=... .

XoR ,Dec 27, 2014 at 12:12

You just needed to update ca-certificates package. Before that just disable all repos with https that are failing. That's why solution with commenting mirrorlist or using http instead https would work also.

For example if you need to disable only epel repo:

yum --disablerepo=epel -y update  ca-certificates

This will also help wget, curl, and anything else that uses SSL certificates.

Horatio Alderaan ,Jan 23, 2015 at 0:22

This should be accepted as the correct answer, as it diagnoses the real source of the problem, rather than just providing a work-around. – Horatio Alderaan Jan 23 '15 at 0:22

TrinitronX ,Jan 26, 2015 at 5:31

I've tested this on the CentOS 6.5 bento box and it does make things slightly more reliable when running yum clean all && yum makecache . However, it still fails sometimes. Adding a retry to my script made it even more reliable. I suspect that some mirrors are unreliable and a retry can give another mirror that works. So if at first it doesn't succeed, try try again! – TrinitronX Jan 26 '15 at 5:31

Stéphane ,Mar 10, 2015 at 13:44

Wonder how you found that solution ... the error message was quite criptic for me – Stéphane Mar 10 '15 at 13:44

XoR ,Mar 10, 2015 at 15:45

Well this comes from experience, and yes, message is cryptic :) – XoR Mar 10 '15 at 15:45

Ekramul Hoque ,Apr 11, 2016 at 18:44

Thanks for nice answer – Ekramul Hoque Apr 11 '16 at 18:44

sumit pandit ,Jan 12, 2015 at 12:23

use this command:
sudo sed -i "s/mirrorlist=https/mirrorlist=http/" /etc/yum.repos.d/epel.repo

or alternatively use command

vi /etc/yum.repos.d/epel.repo

go to line number 4 and change the url from

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

to

mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

Joseph N. ,Nov 23, 2014 at 15:37

For my case commenting out mirrorlist and uncomenting entries with baseurl din't work. I noticed the problem was with the https iniside the .repo fedora files. I solved it by going in /etc/yum.repository.d and replacing all https with http in different .repo files. That worked!!

Rashad Saif ,May 3, 2016 at 9:54

Check if you access internet throw proxy then you have to add internet proxy address to yum configuration .

add

proxy=http://ip:port to /etc/yum.conf

Markus ,Aug 11 at 7:06

make sure to have the https proxy also specified. – Markus Aug 11 at 7:06

how to i start ,Feb 4, 2015 at 6:28

I solved this problem by this solution.

you just change in this file /etc/yum.repos.d/epel.repo

mirrorlist= change this url https to http

baseurl= change this url https to http

bummi ,Feb 4, 2015 at 8:08

Please take a look at stackoverflow.com/help/promotionbummi Feb 4 '15 at 8:08

Nabeel Ahmed ,Dec 2, 2016 at 7:34

You may come across this message/error, after installing epel-release. The quick fix is to update your SSL certificates:
yum -y upgrade ca-certificates

Chances are the above error may also occur while certificate update, if so, just disable the epel repo i.e. use the following command:

yum -y upgrade ca-certificates --disablerepo=epel

Once the certificates will be updated, you'll be able to use yum normally, even the epel repo will work fine. In case you're getting this same error for a different repo, just put it's name against the --disablerepo=<repo-name> flag.


Note : use sudo if you're not the root user.

qingbo ,Aug 3 at 5:10

That's the best answer for me :) – qingbo Aug 3 at 5:10

Howard Lee ,Jun 30, 2016 at 17:39

For boxes that does not have internet access, you can remove epel repository:

yum remove epel-release --disablerepo=epel

This happened to me as I accidentally installed epel-release using rpm on a prod box.

Laxman S ,Nov 27, 2014 at 14:06

I solved it by going in /etc/yum.repository.d/. For my case i comment out mirrorlist and uncomenting entries with baseurl. as well as added sslverify=false.

https://serverfault.com/questions/637549/epel-repo-for-centos-6-causing-error

dagelf ,Mar 24, 2015 at 7:07

Not only that, but also changing the URLs to archives.fedoraproject.org/pub/archive/fedora/linux/releases‌​/ (for fedora.repo and fedora-updates.repo). Note the "archives" in front and the "pub/archive" in the path) – dagelf Mar 24 '15 at 7:07

Fabricio ,Apr 13, 2015 at 14:26

I've workaround this issue by changing the https entries in epel.repo file to http.

Sam ,Jun 26, 2015 at 6:09

I guess this should work. I solved my problem with this.

$ sudo yum clean all

$ sudo yum --disablerepo="epel" update nss

Beavus Slagerty ,Mar 5, 2015 at 20:20

All of the above did not work for me, but a rebuild of the rpm database, with the following command, did:
sudo rpm --rebuilddb

Thanks all for the help.

Anil Reddy ,Apr 19, 2016 at 20:26

Changing the mirrorlist URL from https to http fixed the issue for me.

Futur'Fusionneur ,Oct 30 at 22:38

Fixed mine like this:
yum install elfutils-default-yama-scope-0.168-8.el7.noarch --disablerepo=epel
yum install nss-pem -disablerepo=epel
yum reinstall ca-certificates --disablerepo=epel
yum clean all
rm -rf /var/cache/yum
yum update`

,

Walkthrough Steps

Running the following command will update the repo to use HTTP rather than HTTPS:

sudo sed -i "s/mirrorlist=https/mirrorlist=http/" /etc/yum.repos.d/epel.repo

You should then be able to update with this command:

yum -y update

[Oct 29, 2017] >How To Download a RPM Package Using yum Command Without Installing On Linux by nixCraft

July 9, 2008 | www.cyberciti.biz

would like to only download the packages via yum and not install/update them. How do I download a RPM package using yum command under CentOS Enterprise Linux server 5.x or RHEL 5.x systems?

You need to install plugin called yum-downloadonly . This plugin adds a --downloadonly flag to yum so that yum will only download the packages and not install/update them. Following options supported by this plugin:

[a] --downloadonly : don't update, just download a rpm file
[b] --downloaddir=/path/to/dir : specifies an alternate directory to store packages such as /tmp

Please note following instructions are only tested on CentOS server but should work with RHN and RHEL without any problem.

How do I install yum-downloadonly plugin?

Type the following command to install plugin, enter:
# yum install yum-downloadonly
Sample output:

Loading "fastestmirror" plugin
Loading "security" plugin
Loading mirror speeds from cached hostfile
 * base: centos.mirrors.tds.net
 * updates: mirror.myriadnetwork.com
 * addons: mirrors.gigenet.com
 * extras: holmes.umflint.edu
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package yum-downloadonly.noarch 0:1.1.10-9.el5.centos set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 yum-downloadonly        noarch     1.1.10-9.el5.centos  base              9.0 k
Transaction Summary
=============================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 9.0 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): yum-downloadonly-1 100% |=========================| 9.0 kB    00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: yum-downloadonly             ######################### [1/1]
Installed: yum-downloadonly.noarch 0:1.1.10-9.el5.centos
Complete!
How do I download a RPM package only from RHN or CentOS mirror, without installing it?

Download httpd package but don't install/update, enter:
# yum update httpd -y --downloadonly
By default package will by downloaded and stored in /var/cache/yum/ directory. But, you can specifies an alternate directory to store packages such as /opt, enter:
# yum update httpd -y --downloadonly --downloaddir=/opt
Sample output:

yum install httpd -y --downloadonly
Loading "downloadonly" plugin
Loading "fastestmirror" plugin
Loading "security" plugin
Loading mirror speeds from cached hostfile
 * base: centos.mirrors.mypsh.com
 * updates: mirror.steadfast.net
 * addons: mirrors.gigenet.com
 * extras: holmes.umflint.edu
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package httpd.i386 0:2.2.3-11.el5_1.centos.3 set to be updated
filelists.xml.gz          100% |=========================| 2.8 MB    00:03
filelists.xml.gz          100% |=========================| 681 kB    00:11
filelists.xml.gz          100% |=========================| 122 kB    00:00
filelists.xml.gz          100% |=========================|  150 B    00:00
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 httpd                   i386       2.2.3-11.el5_1.centos.3  base              1.1 M
Transaction Summary
=============================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 1.1 M
Downloading Packages:
(1/1): httpd-2.2.3-11.el5 100% |=========================| 1.1 MB    00:01
exiting because --downloadonly specified

To see downloaded file, enter:
# ls -l /opt/*.rpm
Sample output:

-rw-r--r-- 1 root root 1116426 Jan 17 03:36 /opt/httpd-2.2.3-11.el5_1.centos.3.i386.rpm
-rw-r--r-- 1 root root   83452 Oct  2  2007 /opt/lighttpd-fastcgi-1.4.18-1.el5.rf.i386.rpm
-rw-r--r-- 1 root root  635045 Oct 20  2007 /opt/psad-2.1-1.i386.rpm
Method # 2: yum-utils.noarch Package

yum-utils is a collection of utilities and examples for the yum package manager. It includes utilities by different authors that make yum easier and more powerful to use. These tools include: debuginfo-install, package-cleanup, repoclosure, repodiff, repo-graph, repomanage, repoquery, repo-rss, reposync, repotrack, verifytree, yum-builddep, yum-complete-transaction, yumdownloader, yum-debug-dump and yum-groups-manager.
# yum -y install yum-utils.noarch
Now use the yumdownloader command which is a program for downloading RPMs from Yum repositories. Type the following command to download httpd rpm file:
# yumdownloader httpd
Sample outputs:

Loaded plugins: rhnplugin
httpd-2.2.3-31.el5_4.2.x86_64.rpm                        | 1.2 MB     00:00
How Do I Extract Downloaded RPM File?

Type the command as follows:
# rpm2cpio httpd-2.2.3-31.el5_4.2.x86_64.rpm | cpio -idmv

[Oct 19, 2017] Extensive "cleanup" operations following "sudo yum upgrade"

Oct 19, 2017 | www.bashoneliners.com
 $ sudo yum upgrade && for pkg in $(package-cleanup --orphans -q); do repoquery $(rpm -q $pkg --queryformat="%{NAME}") | grep -q ".*" && echo $pkg; done | xargs sudo yum -y remove && for pkg in $(package-cleanup --leaves --all -q); do repoquery --groupmember $pkg | grep -q "@" || echo $pkg; done

-- by openiduser143 on April 16, 2014, 9:58 p.m.

Explanation

"sudo yum upgrade" does clean up outdated packages that the current upgrade replaces, but not other outdated packages or the ones that it willfully skips. Yes, that's what "package-cleanup --orphans" will finish, but "orphaned packages" also include packages that are at their latest version but just aren't updated by the repositories (usually a discrete .rpm installation). This one-liner uses "package-cleanup --orphans" but wraps around it to skip packages that aren't in the repositories anyway and just removes outdated packages that have a newer version in the repositories.

No, it's not at the end yet. It has a final command to display all packages that don't belong to any group. Choose any of the "manual extension" packages which aren't really necessary and only clog the system. Limitations

[Mar 20, 2017] CentOS - RHEL See Detailed History Of yum Commands

Mar 20, 2017 | www.cyberciti.biz
The basic syntax is:
yum
history
yum
history
command
#ID
yum
history
[
options
]
history
[
info
|
list
|
packages-list
|
summary
|
addon-info
|
redo
|
undo
|
rollback
|
new
]

yum history yum history command #ID yum history [options] history [info|list|packages-list|summary|addon-info|redo|undo|rollback|new] Examples

First, verify that history has been configured for yum command .
# ls -l /var/lib/yum/history/
Sample outputs:

total 1036
drwxr-xr-x. 30 root root    4096 Dec  9 11:40 2012-11-08
-rw-------.  1 root root 1050624 Dec  9 11:40 history-2012-11-08.sqlite
List your history

Type the following command:
# yum history
OR
# yum history list
Sample outputs:

Fig.01: yum history in action

Fig.01: yum history in action
Where,

  1. ID – Transaction number.
  2. Login user – The name of the user whose login session was used to initiate a yum.
  3. Date and time – The date and time when a transaction was issued by yum.
  4. Action(s) – A list of actions that were performed during a transaction as follows:
    1. D or Downgrade – Package has been downgraded to an older version.
    2. E or Erase – Package has been removed.
    3. I or Install – New package has been installed.
    4. O or Obsoleting – Package has been marked as obsolete.
    5. R or Reinstall – Package has been reinstalled.
    6. U or Update – Package has been updated to a newer version.
  5. Altered â€" The number of packages that were affected by a yum, as follows:
    1. *lt; – Before the transaction finished, the rpmdb database was changed outside yum.
    2. > – After the transaction finished, the rpmdb database was changed outside yum.
    3. * – The transaction failed to finish.
    4. # – The transaction finished successfully, but yum returned a non-zero exit code.
    5. E – The transaction finished successfully, but an error or a warning was displayed.
    6. P – The transaction finished successfully, but problems already existed in the rpmdb database.
    7. s – The transaction finished successfully, but the –skip-broken command line option was used and certain packages were skipped.

To see all transactions, pass the add option as follows:
# yum history list all

You can list only one transactions or transactions in a given range:
# yum history list 7
# yum history list 1..3

Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security
ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
     3 | 106300                   | 2013-08-12 15:14 | Update         |    1   
     2 | 88177                    | 2012-11-09 14:24 | Install        |    2   
     1 | System 
           | 2012-11-08 19:19 | Install        |  380   
history list

List summary of all all past transactions

The syntax is:
# yum history summary
# yum history summary 3
# yum history summary 1..3

Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security
Login user                 | Time                | Action(s)        | Altered 
-------------------------------------------------------------------------------
 <vivek>                   | Last day            | Install          |        1
 <vivek>                   | Last week           | E, I             |        3
root <root>                | Last week           | Update           |        1
 <vivek>                   | Last 2 weeks        | I, U             |      139
 <vivek>                   | Last 3 months       | Update           |        1
root <root>                | Last 3 months       | I, O, U          |      284
106300                     | Last 6 months       | I, U             |        6
88177                      | Over a year ago     | Install          |        2
System <unset>             | Over a year ago     | Install          |      380
history summary

Loaded plugins: downloadonly, fastestmirror, security Login user | Time | Action(s) | Altered -------------------------------------------------------------------------------< vivek> | Last day | Install | 1< vivek> | Last week | E, I | 3 root <root> | Last week | Update | 1< vivek> | Last 2 weeks | I, U | 139< vivek> | Last 3 months | Update | 1 root <root> | Last 3 months | I, O, U | 284 106300 | Last 6 months | I, U | 6 88177 | Over a year ago | Install | 2 System <unset> | Over a year ago | Install | 380 history summary Find out history of a package called nginx

The basic syntax is:
# yum history list PackageNameHere
# yum history list nginx

Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security
ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
    28 |  <vivek>                 | 2013-12-09 11:40 | Install        |    1 EE
history list

Loaded plugins: downloadonly, fastestmirror, security ID | Login user | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 28 | <vivek> | 2013-12-09 11:40 | Install | 1 EE history list

You can also see complete history as follows for mysql package including version number, run:
# yum history package-list mysql
Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security
ID     | Action(s)      | Package                                              
-------------------------------------------------------------------------------
    26 | Install        | mysql-5.1.71-1.el6.x86_64                            
    25 | Erase          | mysql-5.1.71-1.el6.x86_64                          EE
    24 | Install        | mysql-5.1.71-1.el6.x86_64                            
history package-list

Loaded plugins: downloadonly, fastestmirror, security ID | Action(s) | Package ------------------------------------------------------------------------------- 26 | Install | mysql-5.1.71-1.el6.x86_64 25 | Erase | mysql-5.1.71-1.el6.x86_64 EE 24 | Install | mysql-5.1.71-1.el6.x86_64 history package-list

Now, use ID #24 to get detailed information on mysql package:
# yum history info 24
Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security
Transaction ID : 24
Begin time     : Mon Dec  2 11:35:59 2013
Begin rpmdb    : 401:d28899f68a6631be573730605bd4825fe661fcce
End time       :            11:36:03 2013 (4 seconds)
End rpmdb      : 405:47873bf26c150bf0a26279da5c62d4ae4b1c227d
User           :  <vivek>
Return-Code    : Success
Command Line   : install mysql-server mysql
Transaction performed with:
    Installed     rpm-4.8.0-37.el6.x86_64                       @base
    Installed     yum-3.2.29-40.el6.centos.noarch               @base
    Installed     yum-plugin-fastestmirror-1.1.30-14.el6.noarch @base
Packages Altered:
    Install     mysql-5.1.71-1.el6.x86_64         @base
    Install     mysql-server-5.1.71-1.el6.x86_64  @base
    Dep-Install perl-DBD-MySQL-4.013-3.el6.x86_64 @base
    Dep-Install perl-DBI-1.609-4.el6.x86_64       @base
history info

Loaded plugins: downloadonly, fastestmirror, security Transaction ID : 24 Begin time : Mon Dec 2 11:35:59 2013 Begin rpmdb : 401:d28899f68a6631be573730605bd4825fe661fcce End time : 11:36:03 2013 (4 seconds) End rpmdb : 405:47873bf26c150bf0a26279da5c62d4ae4b1c227d User : <vivek> Return-Code : Success Command Line : install mysql-server mysql Transaction performed with: Installed rpm-4.8.0-37.el6.x86_64 @base Installed yum-3.2.29-40.el6.centos.noarch @base Installed yum-plugin-fastestmirror-1.1.30-14.el6.noarch @base Packages Altered: Install mysql-5.1.71-1.el6.x86_64 @base Install mysql-server-5.1.71-1.el6.x86_64 @base Dep-Install perl-DBD-MySQL-4.013-3.el6.x86_64 @base Dep-Install perl-DBI-1.609-4.el6.x86_64 @base history info

To find out what additional information is available for a certain transaction:
# yum history addon-info id
# yum history addon-info 24

To just get info on last transaction:
# yum history addon-info last

[Mar 19, 2017] How to Use Yum History to Find Out Installed or Removed Packages Info by Aaron Kili

This article looks like a derivative of YUM History (list, info, summary, repeat, redo, undo, new) - If Not True Then False
Feb 17, 2017 | tecmint.com

.... ... ...

To view a full history of YUM transactions, we can run the command below which will show us the: transaction id, login user who executed the particular action, date and time when the operation happened, the actual action and additional information about any thing wrong with the operation:

# yum history 

...The history sub-commands: info/list/summary can take a transaction ID or package name as an argument. Additionally, the list sub-command can take a special argument, all meaning – all transactions.

The previous history command is equivalent to running:

# yum history list all

And, you can view details of transactions concerning a given package such as httpd web server with the info command as follows:

# yum history info httpd

To get a summary of the transactions concerning httpd package, we can issue the following command:

# yum history summary httpd

...It is also possible to use a transaction ID, the command below will display details of the transaction ID 15.

# yum history info 15

...There are sub-commands that print out transaction details of a specific package or group of packages. We can use package-list or package_info to view more info about httpd package like so:

# yum history package-list httpd
OR
# yum history package-info httpd

...To get history about multiple packages, we can run:

# yum history package-list httpd epel-release
OR
# yum history packages-list httpd epel-release

...Furthermore, there are certain history sub-commands that enable us to: undo/redo/rollback transactions.

  1. Undo – will undo a specified transaction.
  2. redo – repeat the work of a specified transaction
  3. rollback – will undo all transactions up to the point of the specified transaction.

They take either a single transaction id or the keyword last and an offset from the last transaction.

For example, assuming we've done 60 transactions, "last" refers to transaction 60, and "last-4" points to transaction 56.

Suggested Read: How to Use 'yum-utils' to Maintain Yum and Boost its Performance

This is how the sub-commands above work: If we have 5 transactions: V, W, X, Y and Z, where packages where installed respectively.

# yum history undo 2    #will remove package W
# yum history redo 2    #will  reinstall package W
# yum history rollback 2    #will remove packages from X, Y, and Z. 

In the following example, transaction 2 was a update operation, as seen below, the redo command that follows will repeat transaction 2 upgrading all the packages updated by that time:

# yum history | grep -w "2"

Yum – Find Package Transaction ID

# yum history redo 2

The redo sub-command can also take some optional arguments before we specify a transaction:

  1. force-reinstall – reinstalls any packages that were installed in that transaction (via yum install, upgrade or downgrade).
  2. force-remove – removes any packages that were updated or downgraded.
# yum history redo force-reinstall 16

...These sub-commands provide us information about the history DB and additional info sources:

  1. addon-info – will provide sources of additional information.
  2. stats – displays statistics about the current history DB.
  3. sync – enables us to alter the the rpmdb/yumdb data stored for any installed packages.

Consider the commands below to understand how these sub-commands practically work:

# yum history addon-info
# yum history stats
# yum history sync

To set a new history file, use the new sub-command:

# yum history new

We can find a complete information about YUM history command and several other commands in the yum man page:

# man yum

Suggested Read: 4 Ways to Disable/Lock Certain Package Updates Using Yum

That's it for now. In this guide, we explained various YUM history commands to view details of YUM transactions. Remember to offer us your thoughts concerning this guide via the comment section below.

[Mar 19, 2017] YUM History (list, info, summary, repeat, redo, undo, new)

Notable quotes:
"... yum history list ..."
"... yum history repeat ..."
"... ...yum history undo ..."
"... ... yum history redo ..."
"... yum history new ..."
Mar 19, 2010 | www.if-not-true-then-false.com
Yum (Yellowdog Update Modified) is RPM Packet Management system for Fedora, CentOS, Red Hat, OpenSuse etc. Yum history (list, info, summary, repeat, redo, undo, new) commands is added on 3.2.25 version. So this works every Linux Distros, which uses yum 3.2.25 or newer . Yum history command is a really useful in situations where the need to example rollback latest yum activity or undelete some deletes or just see what is updated lately.

Yum history and Yum history list

yum history lists all latest yum operations and yum history list list all operations or just selected package operations

yum history info list installed packages.

yum history info 2

...Shows summary of latest operations.

 yum history summary
...yum history repeat command repeats old operation by history ID.
 yum history repeat 2

...yum history undo simply undo operations by history ID.

... yum history redo simply redos operation from yum history by ID.

yum history redo 2
...yum history new command delete/clear old history listing.
yum history new

[Feb 19, 2017] How to Use Yum History to Find Out Installed or Removed Packages Info

Feb 19, 2017 | www.tecmint.com
View Complete YUM History

To view a full history of YUM transactions, we can run the command below which will show us the: transaction id, login user who executed the particular action, date and time when the operation happened, the actual action and additional information about any thing wrong with the operation:

# yum history 

View Yum History Use Yum to Find Package Info

The history sub-commands: info/list/summary can take a transaction ID or package name as an argument. Additionally, the list sub-command can take a special argument, all meaning – all transactions.

The previous history command is equivalent to running:

# yum history list all

And, you can view details of transactions concerning a given package such as httpd web server with the info command as follows:

# yum history info httpd

Yum – Find Package Info

To get a summary of the transactions concerning httpd package, we can issue the following command:

# yum history summary httpd

Yum – Find Summary of Package

It is also possible to use a transaction ID , the command below will display details of the transaction ID 15 .

# yum history info 15

Yum – Find Package Info Using ID Use Yum History to Find Package Transaction Info

There are sub-commands that print out transaction details of a specific package or group of packages. We can use package-list or package_info to view more info about httpd package like so:

# yum history package-list httpd
OR
# yum history package-info httpd

Yum – Find Package Transaction Info

To get history about multiple packages, we can run:

# yum history package-list httpd epel-release
OR
# yum history packages-list httpd epel-release

Yum – Find Multiple Packages Info Use Yum to Rollback Packages

Furthermore, there are certain history sub-commands that enable us to: undo/redo/rollback transactions.

  1. Undo – will undo a specified transaction.
  2. redo – repeat the work of a specified transaction
  3. rollback – will undo all transactions up to the point of the specified transaction.

They take either a single transaction id or the keyword last and an offset from the last transaction.

For example, assuming we've done 60 transactions, " last " refers to transaction 60 , and " last-4 " points to transaction 56 .

Suggested Read: How to Use 'yum-utils' to Maintain Yum and Boost its Performance

This is how the sub-commands above work: If we have 5 transactions: V, W, X, Y and Z, where packages where installed respectively.

# yum history undo 2    #will remove package W
# yum history redo 2    #will  reinstall package W
# yum history rollback 2    #will remove packages from X, Y, and Z. 

In the following example, transaction 2 was a update operation, as seen below, the redo command that follows will repeat transaction 2 upgrading all the packages updated by that time:

# yum history | grep -w "2"

Yum – Find Package Transaction ID

# yum history redo 2

Yum Redo Package Update

The redo sub-command can also take some optional arguments before we specify a transaction:

  1. force-reinstall – reinstalls any packages that were installed in that transaction (via yum install, upgrade or downgrade).
  2. force-remove – removes any packages that were updated or downgraded.
# yum history redo force-reinstall 16

Yum – Force Install Package Find Yum History Database and Sources Info

These sub-commands provide us information about the history DB and additional info sources:

  1. addon-info – will provide sources of additional information.
  2. stats – displays statistics about the current history DB.
  3. sync – enables us to alter the the rpmdb/yumdb data stored for any installed packages.

Consider the commands below to understand how these sub-commands practically work:

# yum history addon-info
# yum history stats
# yum history sync

To set a new history file, use the new sub-command:

# yum history new

We can find a complete information about YUM history command and several other commands in the yum man page:

# man yum

Suggested Read: 4 Ways to Disable/Lock Certain Package Updates Using Yum

That's it for now. In this guide, we explained various YUM history commands to view details of YUM transactions. Remember to offer us your thoughts concerning this guide via the comment section below. Share + 0 3

[Feb 08, 2017] http://www.trinix.be

Feb 08, 2017 | www.trinix.be
)

Sometimes it can be handy to set up your own repository to prevent from downloading the remote repository over and over again. This tutorial shows how to create a CentOS mirror for your local network. If you have to install multiple systems in your local network then all needed packages can be downloaded over the fast LAN connection, thus saving your internet bandwidth.

Create the Directories:

mkdir -pv /var/www/html/centos/4/{os,updates}/i386

Replacing 4 and i386 with your major version and architecture.
Additionally you'll need some deeper directories. This is the correct location to copy the CD/DVD rpms.

Quote:
mkdir -pv /var/www/html/centos/4/os/i386/CentOS/RPMS/
The Base Repository

Copy the RPMs from the CDs/DVD to /var/www/html/centos/base .

Create the base repository headers:

createrepo /var/www/html/centos/4/os/i386/

The Updates Repository

Select an rsync mirror for updates: check out this list of aviable mirrors: Centos OS Mirror list and these are identified with rsync .

For example: rsync://ftp.belnet.be/packages/centos/

The mirrors share a common structure for updates. Simply append /updates/<d version>/<base arch> .

Rsync to create the updates-released repository:

/usr/bin/rsync -avrt rsync://ftp.riken.jp/centos/4/updates/i386 --exclude=debug/ /var/www/html/centos/4/updates/

This will create a complete update repository at /var/www/html/centos/4/updates/i386 . The repodata directory will be created with all of the headers.

You can additionally pipe this into mail to receive an email when updates are available.

/usr/bin/rsync -avrt rsync://ftp.riken.jp/centos/4/updates/i386 --exclude=debug /var/www/html/centos/4/updates/ | /bin/mail you@example.com -s "New Repo Updates"

Next I would advise to setup a cron job to run the rsync (above). In this manner your repository is kept updated and only new updates and headers will be downloaded to your repository.

Yum Configuration

Edit yum.conf :

vi /etc/yum.repos.d/CentOS-Base.repo

[base]
name=CentOS-$releasever - Base
baseurl=http://192.168.*.*/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#released updates
[update]
name=CentOS-$releasever - Updates
baseurl=http://192.168.*.*/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

That's it.

SPECIAL THANKS TO kylehase (for sending me corrections)

[Feb 08, 2017] Create your own private yum repository.

Notable quotes:
"... /var/ftp/repo/Fedora/10/i386 ..."
"... /var/ftp/repo/Fedora/10/x86_64 ..."
"... /var/ftp/repo/Fedora/10/SRPMS ..."
"... /var/ftp/repo/Fedora/10/i386 ..."
"... /var/ftp/repo/Fedora/10/x86_64 ..."
"... ftp://internalhost.com/repo/Fedora/10/i386 ..."
"... /etc/yum.repos.d/my.repo ..."
Feb 08, 2017 | linuxservconf.blogspot.com

Sometimes, especially when you create your own RPMs, it is extremely useful to keep them in a local YUM repository . The advantage of this is that, when you install a package, YUM automatically resolves any dependencies, not only by downloading the necessary packages from the other repositories you might have in you list, but also by using your local repo as a resource for potential dependencies.

So, when installing a package (eg my_package.rpm ) with YUM, you are supposed to have already created RPM packages for all of the my_package.rpm 's dependencies and to have updated the repository's metadata, so that yum is able to resolve all the dependencies. If these dependencies do not exist in any of the repositories in your list, then, in short, you cannot install your package with yum.

So, in order to install an RPM package and all the other packages that it depends on, you only need to run:

# yum install my_package.rpm

How to create a local YUM repo ?

You will need an utility, named createrepo . Its RPM package exists in Fedora Extras. To install it, just run as root:

Terminal
# yum install createrepo

Then, put all your custom RPM packages in a directory. Assuming that this directory is /path/to/repository , you can create all the necessary metadata for your local repository by running the following command as root or as the user that owns the directory:

Terminal
# createrepo -v /path/to/directory

That's it! Your local YUM repository is ready.

Keep in mind that every time you put any new RPMs in that directory or remove any old RPMs, you will need to run the above command again, so that the repository metadata gets updated.

Add your local repo to the list

The next thing you need to do is to add your local repository to your list of repos, so that yum knows where to find it. This info is kept in the /etc/yum.repos.d/ directory. As root, create a new text file in this directory, name it fedora-local.repo (you can use any name you like, but remember to add the extension .repo ), and add the following info in it:

Terminal
[root@station1.example.com~]# cat /etc/yum.repos.d/fedora-local.repo
[localrepo]
name=[give any name you like without the square brackets ofcourse]
baseurl=[file:| ftp | http |<path to the repository>]
enabled=1
gpgcheck=0


In Order to access the repository over ftp or http the urls should be modified as follows
baseurl=http://server1.example.com/path/to/repository
or
baseurl=ftp://server1.example.com/path/to/repository

As you can see, we used the protocol file:/// in the baseurl option. This assumes that the local repo exists in the local machine. If it exists in another machine of your internal network, feel free to use any other protocol in order to tell yum where to find your local repository, For example you can use http:// , ftp:// , smb:// etc.

In the above example, the GPG key check is disabled ( gpgcheck=0 ). If you sign your packages, you can set this to " 1 " and uncomment the following line ( gpgkey=... ). This contains the path to your public key, so that YUM can verify the package signatures.

You can have as many local YUM repositories as you like.

Other uses of a local repository

Using a local repository does not only serve as a place for your custom RPMs. You can perfectly save some bandwidth by downloading all the released fedora updates in that repo and use this to update all the systems of your internal network. This will save bandwidth and time.

The Procedure is the same for all RPM based systems, using YUM Package Manager. So this can be applied to Fedora, Redhat and CentOS systems

Create your own yum repository - TechRepublic

The standard RPM package management tool in Fedora, Red Hat Enterprise Linux, and CentOS is the yum package manager. Yum works quite well, if a little bit slower than other RPM package managers like apt4rpm and urpmi, but it is solid and handles dependencies extremely well. Using it with official and third-party repositories is a breeze to set up, but what if you want to use your own repository? Perhaps you manage a large computer lab or network and need to have - or want to have - certain packages available to these systems that you maintain in-house. Or perhaps you simply want to set up your own repository to share a few RPM packages with the world or just your friends.

Creating your own yum repository is very simple, and very straightforward. In order to do it, you need the createrepo tool, which can be found in the createrepo package, so to install it, execute as root:

# yum install createrepo

Once the package is installed, you can begin creating your repository. You will also need some RPM packages to create the repository with. Decide where you want to store your repository; let's say, /var/ftp/repo will be the base directory.

Depending on how particular you want to get, you can dump everything to a single repository or keep things organized. I'm a big fan of organization, so let's assume you will be creating a repository for Fedora 10 and have both i386 and x86_64 packages you want to be made available with it. I would create an appropriate directory tree using the following commands:

# mkdir -p /var/ftp/repo/Fedora/10/{SRPMS,i386,x86_64}

Now copy your i386 packages to /var/ftp/repo/Fedora/10/i386 , your x86_64 packages to /var/ftp/repo/Fedora/10/x86_64 , and the SRPMS you have (if wanted) to /var/ftp/repo/Fedora/10/SRPMS . To easily automate the creation of the repository metadata, create a shell script called create-my-repo and place it somewhere in your PATH:

#!/bin/sh
destdir="/var/ftp/repo/Fedora/10"
for arch in i386 x86_64
do
    pushd ${destdir}/${arch} >/dev/null 2>&1
        createrepo .
    popd >/dev/null 2>&1
done

Make the script executable and whenever you run it, it will call the createrepo tool on the two directories: /var/ftp/repo/Fedora/10/i386 and /var/ftp/repo/Fedora/10/x86_64 . Once this is done, your repository is ready for use.

If /var/ftp is the available FTP root, then ftp://internalhost.com/repo/Fedora/10/i386 would be the download URL for the i386 packages. To make this available to the other client systems, create a yum repository configuration file called /etc/yum.repos.d/my.repo with the following contents:

[myrepo]
name=My Repository
baseurl=ftp://internalhost.com/repo/Fedora/10/$basearch
enabled=1

This file can be used on both i386 and x86_64 clients due to the "$basearch" specifier. It will be enabled the next time "yum update" is run.

Creating your own yum repository is very easy and very straightforward, and is a great way for administrators to distribute specialized packages within an organization.

Configuring Proxy Settings on Centos via the Command Line

GeekSecrets.net
In your favourite editor open the .bash_profile file for editing.

(example: vi ~/.bash_profile)

Add the following lines to the end of the file:
http_proxy=http://proxy_server_address:port
export no_proxy=localhost,127.0.0.1,192.168.0.34
export http_proxy
http_proxy should be the ip address or hostname, plus the port of your proxy server

no_proxy should be any exclusions you want to make – addresses that you don't want to send via the proxy.

NOTE: This must be done for each individual user, including root.

If you don't want to log out of your shell session, you can reload the bash profile with the following:

source .bash_profile
Configuring YUM to use proxy

To configure "yum" to use the HTTP / HTTPS proxy you will need to edit the /etc/yum.conf configuration file. Open /etc/yum.conf in your favorite editor and add the following line.

proxy=http://proxy_server_address:port
Save and close the file, then clear the cache used by yum with the following command:
yum clean all

Yum Proxy settings - Tugriceri Web Notes

Yum Proxy settings

by Emre Tugriceri on Mar.26, 2011, under Linux, Yum


[root@localhost ~]# vi /etc/yum.conf
•proxy=http://10.129.0.23:8080
•http_proxy=http://10.129.0.23:8080

[root@localhost ~]# declare -x ftp_proxy="http://10.129.0.23:8080″
[root@localhost ~]# declare -x http_proxy="10.129.0.23:8080″

[Apr 11, 2014] How do I exclude kernel or other packages from getting updated in Red Hat Enterprise Linux while updating system via yum

Unfortunately I do not see the capability to exclude the group, for example Infiniband Support
2013-12-12 | Red Hat
# yum update --exclude=PACKAGENAME 

For example, to exclude all kernel related packages:

# yum update --exclude=kernel*
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exclude=kernel* samba*       

yum-plugin-list-data

6.10. yum-plugin-list-data. This extension add the commands:

They all take the same arguments as the command list and info. The difference between list and info variants is that info lists all packages under each addition.

YUM History (list, info, summary, repeat, redo, undo, new)

Yum (Yellowdog Update Modified) is RPM Packet Management system for Fedora, CentOS, Red Hat, OpenSuse etc. Yum history (list, info, summary, repeat, redo, undo, new) commands is added on 3.2.25 version. So this works every Linux Distros, which uses yum 3.2.25 or newer. Yum history command is a really useful in situations where the need to example rollback latest yum activity or undelete some deletes or just see what is updated lately.

Yum history and Yum history list

yum history lists all latest yum operations and yum history list list all operations or just selected package operations

[Jul 29, 2013] Managing Software with yum

CentOS.org

Searching for Packages with yum

Use the search features of yum to find software that is available from the configured repositories, or already installed on your system. Searches automatically include both installed and available packages.

The format of the results depends upon the option. If the query produces no information, there are no packages matching the criteria.

5.1. Searching by Package Name and Attributes

To search for a specific package by name, use the list function. To search for the package tsclient, use the command:

su -c 'yum list tsclient'

Enter the password for the root account when prompted.

To make your queries more precise, specify packages with a name that include other attributes, such as version or hardware architecture. To search for version 0.132 of the application, use the command:

su -c 'yum list tsclient-0.132'

5.2. Advanced Searches

If you do not know the name of the package, use the search or provides options. Alternatively, use wild cards or regular expressions with any yum search option to broaden the search critieria.

The search option checks the names, descriptions, summaries and listed package maintainers of all of the available packages to find those that match. For example, to search for all packages that relate to PalmPilots, type:

su -c 'yum search PalmPilot'

Enter the password for the root account when prompted.

The provides function checks both the files included in the packages and the functions that the software provides. This option requires yum to download and read much larger index files than with the search option.

To search for all packages that include files called libneon, type:

su -c 'yum provides libneon'

To search for all packages that either provide a MTA (Mail Transport Agent) service, or include files with mta in their name:

su -c 'yum provides MTA'

For each command, at the prompt enter the password for the root account.

Use the standard wildcard characters to run any search option with a partial word or name: ? to represent any one character, and * to mean zero or more characters. Always add the escape character (\) before wildcards.

To list all packages with names that begin with tsc, type:

su -c 'yum list tsc\*'
Regular Expressions
Use Perl or Python regular expressions to carry out more complex queries.

5.3. Understanding Matches

Searches with yum show all of the packages that match your criteria. Packages must meet the terms of the search exactly to be considered matches, unless you use wildcards or a regular expression.

For example, a search query for shadowutils or shadow-util would not produce the package shadow-utils. This package would match and be shown if the query was shadow-util\?, or shadow\*.

[Jul 29, 2013] How to use YUM to install and uninstall packages

FedoraForum.org
Introduction

To update the system applying the most recent corrective patches of security and to the operating system is not as difficult as many do not suppose, nor either must be a hell of dependencies between packages RPM as some others argue. The reality of the things is that it is much very simple and single requires of good bandwidth or very many patience. Next we presented/displayed the procedures to use yum and to make easily what some denominate "horrible, difficult and complicated ".

Please note there are some changes that apply to Fedora Core 3. You will need to install GPG Key for yum in FC3.

Creating Yum Repo's For FC3.

To update system. Update of the system with all the dependencies that are necessary:

Code:

yum update
Searches. To make a search of some package or term in the data base in some of the formed deposits yum in the system:

Code:

 yum search any-package
Example:

Code:

yum search httpd
I hope this will help you understand how to use yum more effeciently. Any erros in this how please notify me.
Consultation of information. To consult the information contained in a package in individual:

Code:

 yum info any-package
Example:

Code:

yum info httpd
Installation of packages. Installation of paquetería with automatic resolution of dependencies:

Code:

 yum install any-package
Example.

Code:

yum install gkrellm
Uninstalling packages. Desinstalación of packages along with everything what it depends on these:

Code:

yum remove any-package
Example.

Code:

yum remove gkrellm
Listing Packages. The following thing will list all the packages available in the data base yum and that can settle:

Code:

 available yum list|less
The following thing will list all the packages installed in the system:

Code:

 yum list installed|less
The following thing will list all the packages installed in the system and that can (they must) be updated:

Code:

 yum list updates|less
Cleaning of the system.

Yum leaves as result of its use heads and packages RPM stored in the interior of the directory located in the route /var/cache/yum/. Particularly the packages RPM that have settled can occupy much space and is by such reason agrees to eliminate them once no longer they have utility. Also it agrees to do the same with the old heads of packages that no longer are in the data base. In order to make the corresponding cleaning, the following thing can be executed:

Code:

 yum clean all
Group install

Code:

yum groupinstall "groupname"
Dont forget the quotation marks for group install.

I hope this will help you understand how to use yum more effeciently. I did this for our newbies that may want to uninstall packages which is not mention in the fedora FAQ. For more info on yum go here: http://www.fedorafaq.org/#installsoftware

Create your own local repository and solve yum related problems by Kirti Ranjan Parida

November 22, 2010 | A techie's confessions

In RHEL 5.0 onwards Red hat introduced YUM concept by which it is very easy to install some rpm without being getting worry about the dependency problem.YUM takes care of this dependency problem by selecting all dependent RPM to install from a central repository either from RED HAT or from some third party repository like oracle has or you can create your own repository if you want to use YUM offline

[Feb 28, 2012] How To Lock Installed RPM Package if you are using YUM

Ravi Saive A Technology Blog For Newbies

Lets assume you have a RPM Package installed called firefox-3.6.17-1.el5.centos and you don't want to update it even if a newer version is available. This can by done by using YUM plugin called yum-versionlock. This plugin allows you to lock package update. Just you need to add the list of packages that you want to lock their updates with their version and architecture in the lock file /etc/yum/pluginconf.d/versionlock.list. So, whenever you update your system these packages where excluded by the YUM, because yum reads the file before updating the packages. Now enable this great plugin by following simple easy steps below.

1. Install the plugin by using below command.
[root@ravisaive.in ~]# yum install yum-versionlock
2. Once plugin installed, check enabled = 1 appears in /etc/yum/pluginconf.d/versionlock.conf.
[root@ravisaive.in ~]# cat /etc/yum/pluginconf.d/versionlock.conf 
[main]
enabled = 1
locklist = /etc/yum/pluginconf.d/versionlock.list
#  Uncomment this to lock out "upgrade via. obsoletes" etc. (slower)
# follow_obsoletes = 1
3. Now add the packages you want to lock in /etc/yum/pluginconf.d/versionlock.list. For example firefox-3.6.17-1.el5.centos.
[root@ravisaive.in ~]# cat /etc/yum/pluginconf.d/versionlock.list
firefox-3.6.17-1.el5.centos
4. Once you added your package in lock list. Try to install the same package with YUM.
[root@ravisaive.in ~]# yum install firefox
Loaded plugins: downloadonly, fastestmirror, priorities, versionlock
Loading mirror speeds from cached hostfile
 * base: centos.aol.in
 * epel: ftp.kddilabs.jp
 * extras: centos.aol.in
 * rpmforge: fr2.rpmfind.net
 * updates: ftp.iitm.ac.in
Reducing CentOS-5 Testing to included packages only
Finished
1380 packages excluded due to repository priority protections
Reading version lock configuration
Setting up Install Process
Nothing to do
5. Check above output in red line, Yum reads lock file before installating them.

[Jul 06, 2010] Using RHEL5.3 DVD as a Yum repository. - Nibble of Thoughts

I have a RHEL5 DVD but it is difficult to install a package using rpm because I need to manually add all dependent packages. Here is now I create a Yum reposiroty so that I can use yum to install these packages. Note that the DVD is automatically mounted as /media/RHEL_5.1 x86_64 DVD.

> cd /media/RHEL5_5.1\ x86_64\ DVD/Client
> rpm -ihv createrepo-0.4.4-2.fc6.noarch.rpm
> cd /home/blah/some_dir
> createrepo -vpo /home/blah/some_dir /media/RHEL5_5.1\ x86_64\ DVD
> cd /home/blah/some_dir
> ln -s /media/RHEL5_5.1\ x86_64\ DVD/Client Client
> ln -s /media/RHEL5_5.1\ x86_64\ DVD/Workstation Workstation

Then create a file /etc/yum.repos.d/DVD.repo with the following content

[dvd]
name=RHEL4 DVD
baseurl=file:///home/blah/some_dir
enabled=1
gpgcheck=0

Run
> yum update

and you are done.

[May 12, 2010] Learn Linux, 101 RPM and YUM package management by Ian Shields

Package locations

In the previous section, you learned how to install an RPM package. But where do the packages come from? How does yum know where to download packages from? The starting point is the /etc/yum.repos.d/ directory, which usually contains several repo files. This is the default location for repos, but other locations may be specified in the YUM configuration file, normally /etc/yum.conf. Listing 4 shows the fedora-updates.repo corresponding to the location from which we installed gcl on our Fedora 12 system.

A typical repo file is divided into three sections, one for normal packages, one for debug packages, and the last for source packages. Usually there will be several copies of a distribution's packages available from different locations, or mirrors. So the repo file tells yum where to find the latest list of mirrors for each section. Note that the distribution release level and machine architecture are parameterized, so yum would download the list for my x86_64 Fedora 12 system from https://mirrors.fedoraproject.org/metalink?repo=updates-released-f12&arch=x86_64.

In addition to the repository location, the repo file tells whether a particular repository is enabled and whether GPG signatures should be used to check the downloaded packages.

[ian@echidna ~]$ cat /etc/yum.repos.d/fedora-updates.repo
[updates]
name=Fedora $releasever - $basearch - Updates
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever
/$basearch/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$r
eleasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

[updates-  does not have this feature as far 
	as I know.

Yum & Repositories

I noticed this issue with both CentOS 4 and 5 - Yum will often choose bad mirrors from the mirrorlist file - for example, choosing overseas servers, when an official NZ server exists. And in some cases, the servers it has chosen are horribly slow.

You will probably find that you get better download speeds by editing /etc/yum.repos.d/CentOS-Base.repo and commenting out the mirrorlist lines and setting the baseurl line to point to your preferred local mirror.

Yum-updatesd

CentOS 5 has a new daemon called yum-updatesd, which replaces the old cron job yum update scripts. This script will check frequently for updates, and can be configured to download and/or install them.

However, this daemon is bad for a server, since it doesn't run at a fixed time - I really don't want my server downloading and updating software during the busiest time of day thank-you-very-much!

So, it's bad for a server. Let's disable it with:

service yum-updatesd stop
chkconfig --level 2345 yum-updatesd off

Plus I don't like the idea of having a full blown daemon where a simple cronjob will do the trick perfectly fine - seems like overkill. (although it appears yum-updatesd has some useful features like dbus integration for desktop users)

So, I replace it with my favorite cronjob script approach, by running the following (as root of course):

cat << "EOF" > /etc/cron.daily/yumupdate
 #!/bin/sh
 # install any yum updates
/usr/bin/yum -R 10 -e 0 -d 1 -y update yum > /var/log/yum.cron.log 2>&1
/usr/bin/yum -R 120 -e 0 -d 1 -y update  >> /var/log/yum.cron.log 2>&1
if [ -s /var/log/yum.cron.log ]; then
        /bin/cat /var/log/yum.cron.log | mail root -s "Yum update information" 2>&1
fi
EOF
and if you want to clear up the package cache every week:
cat << "EOF" > /etc/cron.weekly/yumclean
 #!/bin/sh
 # remove downloaded packages
/usr/bin/yum -e 0 -d 0 clean packages
EOF
(please excuse the leading space infront of the comments ( #) - it is to work around a limitation in my site, which I will fix shortly. Just copy the lines into a text editor and remove the space, before pasting into the terminal)

This will install 2 scripts that get run around 4:00am (as set in /etc/crontab) which will check for updates and download and install any automatically. If there were any updates, it will send out an email, if there were none, it doesn't send anything.

(of course, you need sendmail/whatever_fucking_email_server_you_like configured correctly to get the alerts!)

You can change yum to just download and not install the updates (just RTFM), but I've never had a update break anything - update compatibility and quality is always very high - so I use automatic updates.

CentOS 4 had something very similar to this, with the addition of a bootscript to turn the cronjobs on and off.

* Please check out the update at the bottom of this page for futher information on this. UPDATE - 1st May 2007

A reader has informed me that the old RHEL 4 style cronjobs can be found in a package called 'yum-cron'. Just like in RHEL 4, it installs a service called "yum" which you can enable with:

chkconfig --level 2345 yum on
service yum start

However, I will point out a small difference with the Redhat cron script vs. my cron script - the Redhat one will send the list of updates as an email from cron (as cron simply emails the output the script produces). My version allows you to change the subject, and the destination email address. This may/may not be useful to you.

The same reader also points out that there is another package in the CentOS extras repository called 'yum-updateonboot', which installs bootscripts which update your system when you boot it, and will then reboot if there are any kernel updates needed.

You should be able to (I haven't tried myself) enable it with:

chkconfig --level 2345 yum-updateonboot on

Upgrading Red Hat Linux/Fedora Core with yum

Before performing an upgrade with yum, please read the YumUpgradeFaq Wiki.

The basic steps for upgrading a system to the latest Fedora Core release using yum:

1. Install the fedora-release package from the new release
2. Run yum upgrade
3. Reboot

Upgrading to Fedora Core 4

The following steps were used to update a Fedora Core 3 system to Fedora Core 4 using yum.

1. Update yum to the latest Fedora Core 3 version.
# yum -y update yum

2. Download and install the Fedora Core 4 version of fedora-release from one of the Fedora Core mirrors.

Example:
# rpm -Uvh http://download.fedora.redhat.com/pub/fedora/linux/core/4/i386/os/Fedora/RPMS/fedora-release-4-2.noarch.rpm

3. Disable third-party yum repositories, if applicable.

In my configuration, I had the Dag, FreshRPMs, and Dries third-party yum repositories enabled. As of 2005/06/15, only the Dries repository caused an error message (i.e. it had not been updated with Fedora Core 4 packages or it did not have a Fedora Core 4 directory structure) so I will only disable that repository.

# echo "enabled=0" >> /etc/yum.repos.d/dries.repo

4. When upgrading to Fedora Core 4, the kernel must be upgraded before the rest of the packages.
# yum -y update kernel

Otherwise, you may receive the following error message:

--> Running transaction check
--> Processing Dependency: kernel-utils for package: kernel
--> Finished Dependency Resolution
Error: Missing Dependency: kernel-utils is needed by package kernel

5. Disable SELinux, if applicable, and reboot the system to begin using the Fedora Core 4 kernel. I ran into significant problems after this reboot when SELinux was enabled.

To disable SELinux:

# vi /etc/sysconfig/selinux

Change:
SELINUX=enforcing
-- or --
SELINUX=permissive

To:
SELINUX=disabled

# reboot

7. Remove the Fedora Core 3 kernel(s) to prevent the aforementioned kernel-utils package dependency error.
# yum remove kernel-2.6.\*FC3\*
# yum remove kernel-smp\*FC3\* (if you have one or more FC3 SMP kernels installed)

8. Continue the upgrade to Fedora Core 4.
# yum -y upgrade

Note: if you receive the following error, import the RPM-GPG-KEY.

warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID db42a60e
public key not available for caching-nameserver-7.3-3.noarch.rpm

# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY

9. Reboot the system to begin using Fedora Core 4.

10. If applicable, re-enable SELinux by undoing the changes above, and reboot the system to use SELinux.

User-contributed notes on Upgrading to Fedora Core 4

On 2005/07/16, Jay Thorne wrote:

Before you upgrade the kernel, you need to upgrade mkinitrd, otherwise
the initrd that the kernel install process makes is in the old format
and the new kernel will not boot; it dies with a oops.

# yum -y upgrade mkinitrd

Otherwise, this procedure works well. Good work.

Also, in the x86_64 case, you need to specifically upgrade
libselinux.i386 and libselinux.x86_64 before the kernel upgrade, or the
upgrade will fail with a conflict.

# yum -y upgrade libselinux.i386 libselinux.x86_64

Thanks for Wim Cos for writing on 2005/06/16 and providing the steps to update yum to the latest FC3 version and for the steps to remove FC3 SMP kernels, if applicable.

Build Service-User - openSUSE

For SUSE Linux 9.3, 10.0, 10.1 and Factory, you can also use smart', zypper, yum, or apt to install and update packages from the Build Service. The latest smart and yum packages can be found at http://download.opensuse.org/repositories/smart/

Zypper

With openSUSE 10.2, you can also use the command line tool named zypper to add repositories:

zypper sa -r <URL_to_your_repo_file>

For example:

zypper sa -r http://download.opensuse.org/repositories/openSUSE:/Tools/SUSE_Linux_Factory/openSUSE:Tools.repo

For more information, use

zypper help

Smart

smart channel --add http://download.opensuse.org/repositories/<projectname>/<directory>/<project>.repo

To install a package you need to call

 smart update
 smart install <package>
 smart upgrade    # Performs an upgrade of all installed packages using the new repositories.

yum

YUM can use the repositories after the generated .repo file got copied into the /etc/yum.repos.d/ directory. Afterwards you can use yum commandline tools or GUI tools like kyum.

APT

APT isn't very well supported on openSUSE, so we recommend that you use one of the other above methods instead. This paragraph is a translation of an updated article for SuSE Linux 10.1 Apt v SUSE LINUX 10.1 from the czech SuSE portal which deals with the installation and usage of APT (Advanced Package Tool) in SUSE.

First we need apt and apt-libs. Both packages can be found on the DVD. The graphical front-end for Apt - Synaptic - is missing for an unknown reason, so we must be content with the command line version.

To install the above mentioned packages successfully we need to download and install the package install-apt4suse.rpm. The easiest installation is to launch mc as root, find and open the downloaded package by Enter and start the script INSTALL.

In a further step we launch:

 install-apt4suse --update-srclist

which updates the current list of mirrors. The result can be checked in /etc/apt/sources.list. The following table shows the commands which can be used with APT:

apt-get update Creates a list of available packets
apt-get upgrade Updates pre-installed packets by newer versions
apt-get -s upgrade Shows more details about what is to be updated
apt-get -s install "packet name" Shows more details about what is to be installed
apt-get install "packet name" Installs a packet
apt-get reinstall "packet name" Re-installs a packet
apt-get remove "packet name" Removes a packet
apt-get clean Cleanup of the buffered setups

In case of errors with GPG during the installation process open the file /etc/apt/apt.conf.d/gpg-checker.conf and change the entry

 GPG::Check true;

to

 GPG::Check false;

The usage of APT is faster and more transparent to end users compared to YaST and the new ZEN installer.

See also The Advanced Package Tool for SUSE for more information.

HelpUpdate suse - SUSE Wiki

Some options associated with the yum command:

Index of -repo-hardware

yum repository for suse 10.1 - LinuxQuestions.org

Go here:
http://linux01.gwdg.de/~pbleser/rpm-...=/System/smart

Install smart. It is better then Yum and it can handle multiple repostory types. Yast, Yum, Apt-get, Red Carpet, CD/DVD, plain directory are all handled well by Smart.

[Mar 23, 2007] Using YUM in RHEL5 for RPM systems

There is more to Red Hat Enterprise Linux 5 (RHEL5) than Xen. I, for one, think people will develop a real taste for YUM (Yellow dog Updater Modified), an automatic update and package installer/remover for RPM systems.

YUM has already been used in the last few Fedora Core releases, but RHEL4 uses the up2date package manager. RHEL5 will use YUM 3.0. Up2date is used as a wrapper around YUM in RHEL5. Third-party code repositories, prepared directories or websites that contain software packages and index files, will also make use of the Anaconda-YUM combination.

... ... ...

Using YUM makes it much easier to maintain groups of machines without having to manually update each one using RPM. Some of its features include:

RHEL5 moves the entire stack of tools which install and update software to YUM. This includes everything from the initial install (through Anaconda) to host-based software management tools, like system-config-packages, to even the updating of your system via Red Hat Network (RHN). New functionality will include the ability to use a YUM repository to supplement the packages provided with your in-house software, as well as plugins to provide additional behavior tweaks.

YUM automatically locates and obtains the correct RPM packages from repositories. It frees you from having to manually find and install new applications or updates. You can use one single command to update all system software, or search for new software by specifying criteria.


Recommended Links

Google matched content

Softpanorama Recommended

Top articles

Sites

Learn Linux, 101 RPM and YUM package management

Yellowdog Updater, Modified - Wikipedia, the free encyclopedia

Fedora Yum Command Usage

yum command Update - Install Packages Under Redhat Enterprise - CentOS Linux Version 5.x

Yum: Yellow dog Updater, Modified Homepage
Charles Curley's Yum Repository Notes
Yum (Yellow dog Updater, Modified) HOWTO
YUM: Yellowdog Updater, Modified

Reference

If you check the man pages, man yum , you will find the following definition for the use of yum:
yum [options] [command] [package ...]
From the syntax we know that there are yum options and commands, followed by a list of package names. Different yum commands and options will be mixed throughout the development of this manual, but it is very important to emphasize their difference and that not all options apply to all commands. The main reference is the yum manual page yum ( man yum ). One quick option is simply typing the yum command and see the usage help it displays, for example, below is the output of yum according to the extensions installed on a given Fedora 13 system, listing the commands and options:
$ yum
Loaded plugins: aliases, filter-data, list-data, local, merge-conf, presto,
              : refresh-packagekit, tmprepo
You need to give some command
Usage: yum [options] COMMAND

List of Commands:

alias          Adds or lists aliases
check          Check for problems in the rpmdb
check-update   Check for available package updates
clean          Remove cached data
deplist        List a package's dependencies
distribution-synchronization Synchronize installed packages to the latest available versions
downgrade      downgrade a package
erase          Remove a package or packages from your system
groupinfo      Display details about a package group
groupinstall   Install the packages in a group on your system
grouplist      List available package groups
groupremove    Remove the packages in a group from your system
help           Display a helpful usage message
history        Display, or use, the transaction history
info           Display details about a package or group of packages
info-arches    Display aggregate data on the arch attribute of a group of packages
And list all the packages under each
info-archive-sizes Display aggregate data on the archivesize attribute of a group of packages
And list all the packages under each
info-baseurls  Display aggregate data on the url attribute of a group of packages
And list all the packages under each
info-buildhosts Display aggregate data on the buildhost attribute of a group of packages
And list all the packages under each
info-committers Display aggregate data on the committer attribute of a group of packages
And list all the packages under each
info-groups    Display aggregate group data, for matching members
And list all the packages under each
info-installed-sizes Display aggregate data on the installedsize attribute of a group of packages
And list all the packages under each
info-licenses  Display aggregate data on the license attribute of a group of packages
And list all the packages under each
info-package-sizes Display aggregate data on the packagesize attribute of a group of packages
And list all the packages under each
info-packagers Display aggregate data on the packager attribute of a group of packages
And list all the packages under each
info-rpm-groups Display aggregate data on the group attribute of a group of packages
And list all the packages under each
info-vendors   Display aggregate data on the vendor attribute of a group of packages
And list all the packages under each
install        Install a package or packages on your system
list           List a package or groups of packages
list-arches    Display aggregate data on the arch attribute of a group of packages
list-archive-sizes Display aggregate data on the archivesize attribute of a group of packages
list-baseurls  Display aggregate data on the url attribute of a group of packages
list-buildhosts Display aggregate data on the buildhost attribute of a group of packages
list-committers Display aggregate data on the committer attribute of a group of packages
list-groups    Display aggregate group data, for matching members
list-installed-sizes Display aggregate data on the installedsize attribute of a group of packages
list-licenses  Display aggregate data on the license attribute of a group of packages
list-package-sizes Display aggregate data on the packagesize attribute of a group of packages
list-packagers Display aggregate data on the packager attribute of a group of packages
list-rpm-groups Display aggregate data on the group attribute of a group of packages
list-vendors   Display aggregate data on the vendor attribute of a group of packages
localinstall   Install a local RPM
makecache      Generate the metadata cache
provides       Find what package provides the given value
reinstall      reinstall a package
repolist       Display the configured software repositories
resolvedep     Determine which package provides the given dependency
search         Search package details for the given string
shell          Run an interactive yum shell
update         Update a package or packages on your system
upgrade        Update packages taking obsoletes into account
version        Display a version for the machine and/or available repos.


Options:
  -h, --help            show this help message and exit
  -t, --tolerant        be tolerant of errors
  -C, --cacheonly       run entirely from system cache, don't update cache
  -c [config file], --config=[config file]
                        config file location
  -R [minutes], --randomwait=[minutes]
                        maximum command wait time
  -d [debug level], --debuglevel=[debug level]
                        debugging output level
  --showduplicates      show duplicates, in repos, in list/search commands
  -e [error level], --errorlevel=[error level]
                        error output level
  --rpmverbosity=[debug level name]
                        debugging output level for rpm
  -q, --quiet           quiet operation
  -v, --verbose         verbose operation
  -y, --assumeyes       answer yes for all questions
  --version             show Yum version and exit
  --installroot=[path]  set install root
  --enablerepo=[repo]   enable one or more repositories (wildcards allowed)
  --disablerepo=[repo]  disable one or more repositories (wildcards allowed)
  -x [package], --exclude=[package]
                        exclude package(s) by name or glob
  --disableexcludes=[repo]
                        disable exclude from main, for a repo or for
                        everything
  --obsoletes           enable obsoletes processing during updates
  --noplugins           disable Yum plugins
  --nogpgcheck          disable gpg signature checking
  --disableplugin=[plugin]
                        disable plugins by name
  --enableplugin=[plugin]
                        enable plugins by name
  --skip-broken         skip packages with depsolving problems
  --color=COLOR         control whether color is used
  --releasever=RELEASEVER
                        set value of $releasever in yum config and repo files
  --setopt=SETOPTS      set arbitrary config and repo options
  --filter-vendors=FILTER_VENDORS
                        Filter to packages with a matching vendor
  --filter-rpm-groups=FILTER_RPM_GROUPS
                        Filter to packages with a matching group
  --filter-packagers=FILTER_PACKAGERS
                        Filter to packages with a matching packager
  --filter-licenses=FILTER_LICENSES
                        Filter to packages with a matching license
  --filter-committers=FILTER_COMMITTERS
                        Filter to packages with a matching committer
  --filter-arches=FILTER_ARCHES
                        Filter to packages with a matching arch
  --filter-buildhosts=FILTER_BUILDHOSTS
                        Filter to packages with a matching buildhost
  --filter-urls=FILTER_URLS
                        Filter to packages with a matching url
  --filter-package-sizes=FILTER_PACKAGE_SIZES
                        Filter to packages with a packagesize in the given
                        range
  --filter-archive-sizes=FILTER_ARCHIVE_SIZES
                        Filter to packages with a archivesize in the given
                        range
  --filter-installed-sizes=FILTER_INSTALLED_SIZES
                        Filter to packages with a installedsize in the given
                        range
  --filter-groups=FILTER_GROUPS
                        Filter to packages within a matching yum group
  --merge-conf          Merge configuration changes after installation
  --disablepresto       disable Presto plugin and don't download any deltarpms

  Plugin Options:
    --tmprepo=[url]     enable one or more repositories from URLs
    --tmprepo-keep-created
                        keep created direcotry based tmp. repos.



Etc

Society

Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers :   Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy

Quotes

War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotesSomerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose BierceBernard Shaw : Mark Twain Quotes

Bulletin:

Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 :  Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method  : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law

History:

Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

Classic books:

The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

Most popular humor pages:

Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D


Copyright © 1996-2018 by Dr. Nikolai Bezroukov. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) in the author free time and without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

You can use PayPal to make a contribution, supporting development of this site and speed up access. In case softpanorama.org is down you can use the at softpanorama.info

Disclaimer:

The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

Last modified: November 13, 2018