I was using this command in a shell script on my ubuntu server apt-get install -y packagename --no-upgrade
. It will install the package if it is not already present. It will not upgrade the package. Now I want to migrate it to a centos machine. I couldn't find any switch equivalent to --no-upgrade
in yum. Any help?
Centos – Equivalent yum command for `apt-get install -y packagename –no-upgrade`
aptcentosinstallationpackage-managementyum
Related Topic
- Can’t install PHP after apt-get dist-upgrade
- Debian: How to use “apt-get install” without upgrading dependencies
- Redhat – yum simulate install
- Ubuntu – stop an apt-get upgrade
- Ubuntu – Better way of running apt upgrade / dist-upgrade via chef
- Centos – How to install YUM with CentOS with conflicting python versions
Best Answer
There is no such option for
yum
.You will have to work around it with something like this: