Team OS : Your Only Destination To Custom OS !!

Welcome to TeamOS Community, Register or Login to the Community to Download Torrents, Get Access to Shoutbox, Post Replies, Use Search Engine and many more features. Register Today!

Tips & Tricks Yum Command Cheat Codes

mobi0001

The Power Is Yours!!!
Uploader
Power User
✅ Verified Member
Member
Downloaded
62.3 GB
Uploaded
11.3 TB
Ratio
186
Seedbonus
975
Upload Count
89 (104)
Member for 3 years

Yum Command Cheat Codes​


Keep forgetting Yum commands in Red Hat? Here's a list of cheat codes you can keep with you for quick referencing.

Yum is the package manager in Red Hat and Red Hat-based Linux distributions. It allows you to manage every aspect of software on your Red Hat system.

You are not going to learn Yum commands in detail here. Instead, this Yum cheat sheet provides you with a quick and easy overview of all major Yum package manager commands and their respective functionality.

Install, uninstall & upgrade packages​

Here are the Yum commands for installing, removing and updating packages.

CommandFunctionalityExample command
installInstall a package from yum repositorysudo yum install nginx
removeRemove an installed package and its dependenciessudo yum remove nginx
eraseSimilar to remove commandsudo yum erase nginx
updateUpdate or more packages on the systemsudo yum update or sudo yum update gcc
update-toUpdate more packages to a specific versionsudo yum update-to ngingx-2.7-1.1
upgradeupdate all packages to the latest versionsudo yum upgrade
reinstallReinstall current version of a specific packagesudo yum reinstall httpd
autoremoveRemove a package and all other unnecessary packagessudo yum autoremove httpd
downgradeDowngrade a specific package to an earlier versionsudo yum downgrade nginx
swapRemove package and install anothersudo yum swap nginx httpd
localinstallInstall a package from a local repositorysudo yum localinstall
groupinstallInstall packages from a specific groupsudo yum groupinstall "group name"

Base Package Commands​

These commands will help you explore installed packages or search for packages from repositories.

CommandFunctionalityExample
listList package names from repositoriessudo yum list all
infoShow information about a specific packagesudo yum info nginx
searchSearch for a package name and descriptionsudo yum search apache
updateinfoShow information about available package updatessudo yum updateinfo baseos
check-updateShow available package updates from enabled repositoriessudo yum check-update
grouplistShow names and available package groupssudo yum grouplist
deplistShow dependencies for a specific packagesudo yum deplist vsftpd
providesLocate the package that provides a specific filesudo yum provides "*/bin/zsh"
groupinfoShow description and contents of a package groupsudo yum groupinfo "group name"
helpDisplay yum help information or help on sub commandsudo yum help or sudo yum help list

Managing Yum Repos​

For adding and managing additional repositories.

CommandFunctionalityExample
repolistList the available software repositoriessudo yum repolist
repo-pkgsUse packages in a specific repositorysudo yum repo-pkgs baseos list
repoinfoShow information about enabled repositoriessudo yum repoinfo baseos
makecacheDownload repository data to cachesudo yum makecache

Troubleshooting Yum​

When things go wrong with Yum, use these commands.

CommandFunctionalityExample
cleanClean out all cached package data/clean all packages metadatasudo yum clean packages or sudo yum clean all
checkCheck local RPM db for problemssudo yum check
historyView and use yum transactionssudo yum history list or sudo yum history undo or sudo yum history redo
fssnapshotShow LVM snapshotssudo yum fs filters

Helpful Options​

Common options to be used with Yum commands:

Command OptionFunctionalityExample
-yAssume yes if promptedsudo yum -y install nginx
--assumenoAssume no if promptedsudo yum --assumeno install nginx
-vVerbosesudo yum -v install
-qQuietsudo yum -q install
--nopluginsDo not load any YUM pluginssudo yum --noplugins install
--disableplugin=Deactivate a specific pluginsudo yum --disableplugin=ps
--enableplugin=Activate a specific pluginsudo yum --enableplugin=ps
--changelogsShow changelog info of a packagesudo yum --changelogs install httpd
---filter=??Filter output for specific vendors, groups, architectures, and others.sudo yum list available --filter=server
--enablerepo=Enable a deactivated reposudo yum install nginx --enablerepo=??
--disablerepo=Disable an activated reposudo yum install nginx --deactivaterepo=??
--downloadonlyDownload package and no installsudo yum install --downloadonly httpd

Extra Commands​

Some additional commands that you may need to use once a while:

CommandsFunctionality
reposyncSynchronize yum repo to local directory
show-installedShow installed packages
verifytreeCheck local repo for consistency
yumdbChange yum database
yumdownloaderDownload a package from repo to cwd
repoueryQuery remote repo and local db
repoclosureGet unmet dependency list
needs-restartingShow processes that have been updated and require restart
 

PsyTom

Power User
✅ Verified Member
Member
Downloaded
1.4 TB
Uploaded
502.1 TB
Ratio
367.69
Seedbonus
1,662,990
Upload Count
0 (0)
Member for 3 years
appreciate your sharing, done a marvelous job.
 
Top