# Listing installed packages

**URL:** <https://forum.ansible.com/t/listing-installed-packages/35871>\
**Category:** Ansible Project\
**Created:** [October 14, 2021, 5:21pm UTC](https://forum.ansible.com/t/listing-installed-packages/35871 "2021-10-14T17:21:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![harry\_devine](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/harry_devine/32/5293_2.png) [@harry\_devine](https://forum.ansible.com/u/harry_devine)\
**Post date:** [October 14, 2021, 5:21pm UTC](https://forum.ansible.com/t/listing-installed-packages/35871/1 "2021-10-14T17:21:45Z")

</div>

I know I can use the package\_facts module to retrieve a list of installed packages, but I’m having trouble formatting these. I’d like to format it similar to the following:

Package: Version:

Currently I’m doing the following (I’m showing only httpd but ultimately I’d like to list out ALL installed packages:

---

<div class="post-metadata">

**Author:** ![jean-yves](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jean-yves](https://forum.ansible.com/u/jean-yves)\
**Post date:** [October 14, 2021, 5:53pm UTC](https://forum.ansible.com/t/listing-installed-packages/35871/2 "2021-10-14T17:53:11Z")

</div>

You can use templating to have it on one line...

But be careful :  
- you can have more than one version of a package installed. Example: kernel  
- you can have one x86\_64 and one i686 or i386 version of a package installed

Regards,

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [October 14, 2021, 5:54pm UTC](https://forum.ansible.com/t/listing-installed-packages/35871/3 "2021-10-14T17:54:04Z")

</div>

This very question was asked (and answered) a few weeks ago:

[https://groups.google.com/g/ansible-project/c/FsrlY\_57hfo/m/x8jt7LMuBQAJ](https://groups.google.com/g/ansible-project/c/FsrlY_57hfo/m/x8jt7LMuBQAJ)
