Skip to content

Instantly share code, notes, and snippets.

@lcaballero
Created June 26, 2015 21:01
Show Gist options
  • Save lcaballero/65f7a8c22c2a341a9967 to your computer and use it in GitHub Desktop.
Save lcaballero/65f7a8c22c2a341a9967 to your computer and use it in GitHub Desktop.
Yum cheat sheet.
`rpm -i some-pacakge.rpm` This doesn't downlaod or install all dependencies. Instead that process must be done manually by the user.
`yum install some-package` Finds the package and it's dependencies, queries meta-data to determine size, then prompts to install y/n.
`/etc/yum.conf` Holds references and values to control yum. Like cachedir and logfile, etc.
`/etc/yum.repo.d` Holds conf for various repository descriptions.
`yum clean` Cleans out various parts of the locally stored information.
`yum makecache` To create the information i your local database for the enabled repos.
`yum remove some-package` To remove some-package.
`rpm -e some-package` Will also remove some-package. Errors out if package is required dependency of another installed package.
`rpm -e --test some-package` Will test to see if the package can be removed.
`yum remove some-package` Will walk the dependencies, show which packages will be removed, and prompt y/n.
`yum update 'gr*'` Update based on a regex.
Where are packages located?
`rpm -q some-package` Queries the data for a package.
`yum list some-package` List information about the given package.
`yum list | grep logrhythm` List packages with 'logrhythm' in the output.
`rpm -qi some-package`
`rpm --queryformat` Optionaly build custom query output.
`rpm --querytags` Lists all the query tags supported by your system.
`yum search some-package` Searches mirrors for references to the given package name.
`rpm -ql package` Lists files in a package. Useful for see what files were layed down on the system.
`rpm -ql` Can also take the flag -c and -d for 'configuration' and 'documentation'.
`rpm -qpl dl-package` Where 'dl-package' is a file, this will provide same information as though it were installed via the -p flag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment