Command for yum to install all packages without dependency

Is there any way for yum to install only the specified packages, that do not have any dependencies? I’m trying to install all python2 libraries. The code:

su -c 'yum install python-*'

And I get (ignore that one broken package):

Install                        730 Packages (+257 Dependent packages)
Skipped (dependency problems)    1 Package

But I want install only python2-libraries that didn’t have dependencies.

Asked By: m0nhawk


Possible solution:

Installing yum-plugin-downloadonly:

su -c 'yum install yum-plugin-downloadonly'

Downloading all python2 and python3 libraries (make sure /tmp/cache exists):

su -c 'yum --downloadonly --downloaddir=/tmp/cache install python-* python3-*'

cd /tmp/cache and remove all unneeded packages – rm !(python*.rpm).
Finally, install all packages:

su -c 'yum --disablerepo=* --skip-broken install *.rpm'

This will install all packages that have dependencies due to no repository available with additional packages.

Answered By: m0nhawk
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.