yum simulate install

Solution 1:

you can do a yum install without the -y switch (if you use it):

yum install <package>

this will grab a list of packages and dependancies required. Before installing it will ask you if you want to install or not, just answer no and no changes will be made.

Alternatively you can do

yum deplist <package>

to list all the dependancies of a package and see what needs to be installed without downloading or installing anything.

Solution 2:

You can use the check-update option to yum to see if there is an update available for the package. It will tell you if there is an update available (and to what version) for the specified package.

So you could do something like:

yum check-update <package> 

to see the info for a specific package, and:

yum check-update

to see the info for the whole system.


Solution 3:

You can do a dry run using

yum -y update --setopt tsflags=test

if you

specify optional transaction flags (tsflags) on the yum command line with the added option --tsflags.


Solution 4:

yum install --assumeno packagename


Solution 5:

yum's default behavior is to ask you yes/on before actually installing. There's an "--assumeyes" mainly because it bugs you with "yes/no" prompts.

For example:

# yum install s3cmd
# stuff removed
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package s3cmd.noarch 0:1.0.1-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================
 Package                    Arch                        Version                          Repository                 Size
=========================================================================================================================
Installing:
 s3cmd                      noarch                      1.0.1-1.el6                      epel                       94 k

Transaction Summary
=========================================================================================================================
Install       1 Package(s)

Total download size: 94 k
Installed size: 320 k
Is this ok [y/N]: n

Similarly for just "yum update".