Ansible - uninstall delete remove package using the yum module

by
Jeremy Canfield |
Updated: August 18 2022
| Ansible articles
If you are not familiar with modules, check out Ansible - Getting Started with Modules.
The yum module is used to install packages on a Red Hat distribution of Linux on the managed node (e.g. the target system). When state: absent is used, the package will be uninstalled. In this example, if the wget package will be removed.
- name: yum remove wget
yum:
name: wget
state: absent
Did you find this article helpful?
If so, consider buying me a coffee over at