# Does apt module upgrade works with package pinned?

**URL:** <https://forum.ansible.com/t/does-apt-module-upgrade-works-with-package-pinned/15996>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [August 20, 2014, 11:12pm UTC](https://forum.ansible.com/t/does-apt-module-upgrade-works-with-package-pinned/15996 "2014-08-20T23:12:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![J\_Soetanto](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@J\_Soetanto](https://forum.ansible.com/u/J_Soetanto)\
**Post date:** [August 20, 2014, 11:12pm UTC](https://forum.ansible.com/t/does-apt-module-upgrade-works-with-package-pinned/15996/1 "2014-08-20T23:12:27Z")

</div>

Hi,

I would like to know if ansible apt module upgrade works with package pinned.

So far my test shows even though a package had been marked as hold ([https://help.ubuntu.com/community/PinningHowto](https://help.ubuntu.com/community/PinningHowto)), apt upgrade will keep upgrading the package. If i execute apt-get upgrade manually, normally it won’t upgrade the packages i set as hold.

Tested with upgrade=yes and upgrade=safe, seems like it have the same behaviour.

---

<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:** [August 21, 2014, 2:10pm UTC](https://forum.ansible.com/t/does-apt-module-upgrade-works-with-package-pinned/15996/2 "2014-08-21T14:10:58Z")

</div>

When you say upgrade and ignoring pin settings, are you referring to

apt: name=foo state=latest

or

apt: upgrade=yes

?

---

<div class="post-metadata">

**Author:** ![J\_Soetanto](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@J\_Soetanto](https://forum.ansible.com/u/J_Soetanto)\
**Post date:** [August 21, 2014, 9:36pm UTC](https://forum.ansible.com/t/does-apt-module-upgrade-works-with-package-pinned/15996/3 "2014-08-21T21:36:45Z")

</div>

> When you say upgrade and ignoring pin settings, are you referring to
> 
> apt: name=foo state=latest
> 
> or
> 
> apt: upgrade=yes
> 
> ?

I’m referring to the later

apt: upgrade=yes

or

apt: upgrade=safe
