Coming from an ubuntu perspective, if I want to check to see what additional packages will be installed/upgraded I can use apt-get --simulate install <package name>
Is there something similar for yum? Our Red hat box (yum) is our production server, so I would like to see exactly what will be happening before I actually install some package.
Couldn't really find a good solution, someone suggested:
yum --assumeno install <package name>
but this returned:
Command line error: no such option: --assumeno
yum version: 3.2.22
OS version: Red Hat Enterprise Linux Server release 5.6 (Tikanga)
Any ideas or suggestions would be welcome.
you can do a yum install without the -y switch (if you use it):
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
to list all the dependancies of a package and see what needs to be installed without downloading or installing anything.
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:
to see the info for a specific package, and:
to see the info for the whole system.
You can do a dry run using
if you
yum install --assumeno packagename
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:
Similarly for just "yum update".
If you want to use it in script:
Respect for RHEL5 users. :)