# Looking for an ansible module which supports  yum-utils package

**URL:** <https://forum.ansible.com/t/looking-for-an-ansible-module-which-supports-yum-utils-package/30311>\
**Category:** Ansible Project\
**Created:** [May 12, 2019, 9:30pm UTC](https://forum.ansible.com/t/looking-for-an-ansible-module-which-supports-yum-utils-package/30311 "2019-05-12T21:30:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Veera](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/veera/32/4107_2.png) [@Veera](https://forum.ansible.com/u/Veera)\
**Post date:** [May 12, 2019, 9:30pm UTC](https://forum.ansible.com/t/looking-for-an-ansible-module-which-supports-yum-utils-package/30311/1 "2019-05-12T21:30:50Z")

</div>

Hi ,

I am looking for `an ansible module which supports yum-utils package commands.`  
`It consists of a command **"package-cleanup** ` **"** which is pretty useful in cleaning the old kernels.

```auto
package-cleanup --oldkernels --count=2 <= this command will clean up all old kernels and keep just two(The current one and the previous one)

```

But on search in the Module index of ansible, or under package management,there is no module for this command “package-cleanup”.

Do anyone uses the ansible modules of commands from yum-utils? Kindly share the details …

---

<div class="post-metadata">

**Author:** ![David\_Rojas](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@David\_Rojas](https://forum.ansible.com/u/David_Rojas)\
**Post date:** [May 12, 2019, 9:43pm UTC](https://forum.ansible.com/t/looking-for-an-ansible-module-which-supports-yum-utils-package/30311/2 "2019-05-12T21:43:47Z")

</div>

Take a look at the autoremove parameter in the YUM module that may help [https://docs.ansible.com/ansible/latest/modules/yum\_module.html](https://docs.ansible.com/ansible/latest/modules/yum_module.html) or you may have to use the command module
