Essential Yum Commands

Search for a command to run...

No comments yet. Be the first to comment.
k9s is a command-line interface (CLI) that helps you manage your Kubernetes clusters quickly and easily. It provides a visual and interactive way to browse, navigate, and manipulate your cluster resources, saving you time and effort compared to using...

Introduction If you spend a significant amount of time working in the terminal, tmux is a tool that can dramatically boost your productivity and workflow. It's a terminal multiplexer, allowing you to create multiple sessions, windows, and panes withi...

The Silva Mind Control Method is a self-help and meditation program that has been used for years to help people alleviate stress, overcome bad habits and emotional insecurity, increase creativity, develop concentration, harness mental capabilities, a...

Imagine soaring through the IT stratosphere, effortlessly managing your Cloud infrastructure. Sounds pretty cool, right? Well, with the right approach, it's closer than you think. But before you can unlock the full potential of the Cloud, you need a ...

DayDreamCloud
5 posts
For an administrator, mastering yum, the ubiquitous package manager in Red Hat and Fedora systems, is like wielding a magical wand. Its vast array of commands can install, update, remove, and query software packages, keeping your systems optimized and humming along. But navigating this power can be daunting. Fear not, fellow wizards! This guide will equip you with essential yum commands, distilled for maximum practicality and simplicity.
yum install [package_name]: This basic incantation summons the power of yum, installing the specified package. Need Apache? Cast yum install httpd.
yum install [package_name].[architecture]: For specific architecture needs, append the architecture (e.g., x86_64) after the package name.
yum groupinstall [group_name]: Install entire groups of related packages with ease. Need a web server stack? yum groupinstall "Web Server" will conjure it.
yum install https://www.lifewire.com/rpm-file-2622217: Download and install directly from an RPM file with precise control.
yum update: Breathe new life into your system with a single command, updating all installed packages. A potent spell indeed!
yum update [package_name]: Update a specific package if you need targeted magic.
yum check-update: Before unleashing the update storm, use this incantation to see which packages are ready for renewal.
yum remove [package_name]: Banish unwanted packages with this command. Remember, with great power comes great responsibility!
yum erase [package_name]: For a more forceful removal, including configuration files, wield this powerful spell. Use with caution!
yum info [package_name]: Uncover the secrets of any package with this information spell. Learn its version, dependencies, and more.
yum search [keyword]: Seek out the perfect package within the vast repository with this powerful search charm.
yum repolist: List all the repositories your system knows about, like a master librarian.
yum-groups-manager: Manage package groups with finesse, creating custom collections for specific needs.
yumdownloader [package_name]: Download only a package without installing it, like capturing a magical ingredient.
yum clean [cache/all]: Clean up the remnants of past spells, clearing caches and optimizing your system.
Remember, with great power comes great responsibility. Always test commands in a safe environment before unleashing them on critical systems. And remember, the true magic lies in your understanding and skill. Explore the vast compendium of yum commands, refine your incantations, and become a master of your Red Hat domain!
Upgrade Your Way to Excellence:
yum upgrade: Ascend to the next level by upgrading all packages to their latest available versions.
yum upgrade [package_name]: Target a specific package for a focused upgrade.
Caution: While yum upgrade is often used, it's technically intended for upgrading packages within a major release. To upgrade to a newer major release, use yum distro-sync.
Mastering Your Past with History:
yum history: Recall the chronicles of yum commands, revealing past transactions and their details.
yum history info [ID]: Delve deeper into a specific transaction's secrets by providing its ID.
Undoing the Unwanted:
yum history undo [ID]: Reverse a previous transaction, undoing its actions.
yum history rollback [ID]: Revert all transactions back to a specific point in time, using the specified transaction ID as the rollback point.
Sample output for yum history:
ID | Command line | Date and time | Action(s) | Altered
-------|------------------------------------------|-------------------|----------------|---------
93 | install vim-enhanced | 2023-07-21 14:15 | Install | 1
92 | install httpd | 2023-07-21 14:05 | Install | 1
91 | remove nano | 2023-07-20 16:30 | Remove | 1
<...>
Sample command for rollback:
yum history undo 93
Notes to Remember:
Exercise caution when using yum upgrade or yum history undo, especially on critical systems. Test in a safe environment first.
For more complex rollbacks or recovery scenarios, consider using system snapshots or configuration management tools.
Regularly consult yum's official documentation for comprehensive guidance and the latest command options.