# apt module adding/removing packages always results in "changed" state

**URL:** <https://forum.ansible.com/t/apt-module-adding-removing-packages-always-results-in-changed-state/14637>\
**Category:** Ansible Project\
**Created:** [February 23, 2014, 4:45pm UTC](https://forum.ansible.com/t/apt-module-adding-removing-packages-always-results-in-changed-state/14637 "2014-02-23T16:45:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![i\_iordanov](https://avatars.discourse-cdn.com/v4/letter/i/b3f665/32.png) [@i\_iordanov](https://forum.ansible.com/u/i_iordanov)\
**Post date:** [February 23, 2014, 4:45pm UTC](https://forum.ansible.com/t/apt-module-adding-removing-packages-always-results-in-changed-state/14637/1 "2014-02-23T16:45:25Z")

</div>

I’m running Ansible 1.4.4.

I have this in one of my roles to force the presence of certain packages:

- name: Remove packages  
apt: pkg={{ item }} state=absent  
with\_items:
- dmidecode

The result is that I always get a “changed” state even if nothing was removed.

TASK: [common | Remove packages] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
changed: [d01] =\> (item=dmidecode)

The same thing appears to happen with adding a list of packages.

Is this normal or a bug?

Thanks!  
iordan

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [February 24, 2014, 7:32pm UTC](https://forum.ansible.com/t/apt-module-adding-removing-packages-always-results-in-changed-state/14637/2 "2014-02-24T19:32:34Z")

</div>

If you’re seeing this on the development branch code, please file a bug.

–Michael
