# Can update\_cache be used with package module?

**URL:** <https://forum.ansible.com/t/can-update-cache-be-used-with-package-module/21644>\
**Category:** Ansible Project\
**Created:** [June 2, 2016, 3:14pm UTC](https://forum.ansible.com/t/can-update-cache-be-used-with-package-module/21644 "2016-06-02T15:14:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdelaporte](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jdelaporte/32/366_2.png) [@jdelaporte](https://forum.ansible.com/u/jdelaporte)\
**Post date:** [June 2, 2016, 3:14pm UTC](https://forum.ansible.com/t/can-update-cache-be-used-with-package-module/21644/1 "2016-06-02T15:14:51Z")

</div>

I often have playbooks fail to install because my apt or yum cache is out of date. Can I use update\_cache: yes in the package module, or do I need to go back to using apt module and yum module?

Thanks!  
Joanna

---

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [June 2, 2016, 3:20pm UTC](https://forum.ansible.com/t/can-update-cache-be-used-with-package-module/21644/2 "2016-06-02T15:20:13Z")

</div>

On a related note, would be nice if the update\_cache\_time would work  
for the other package managers, unless this is a specific feature of  
apt...

Johannes
