# Debian/Ubuntu: Show available updates (or control if all updates are installed)

**URL:** <https://forum.ansible.com/t/debian-ubuntu-show-available-updates-or-control-if-all-updates-are-installed/20546>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [February 11, 2016, 7:10pm UTC](https://forum.ansible.com/t/debian-ubuntu-show-available-updates-or-control-if-all-updates-are-installed/20546 "2016-02-11T19:10:36Z")\
**Posts on this page:** 3\
**Page:** 1

<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:** [February 11, 2016, 7:10pm UTC](https://forum.ansible.com/t/debian-ubuntu-show-available-updates-or-control-if-all-updates-are-installed/20546/1 "2016-02-11T19:10:36Z")

</div>

Hi everyone,

is it possible to show all available updates on Debian/Ubuntu/...  
via apt? Or rather, check if all updates have been installed without  
errors?

Basically something like this (which does not work, I have not  
tested why):

> ---
> 
> - name: refresh cache  
> apt: update\_cache=yes
> 
> - name: Show all available updates become: true shell: apt-get  
> upgrade -u | mail -s "Available Updates on $(hostname -f)" root

Thanks in advance!

Johannes

---

<div class="post-metadata">

**Author:** ![Tobias\_Wolf](https://avatars.discourse-cdn.com/v4/letter/t/eada6e/32.png) [@Tobias\_Wolf](https://forum.ansible.com/u/Tobias_Wolf)\
**Post date:** [February 12, 2016, 10:16am UTC](https://forum.ansible.com/t/debian-ubuntu-show-available-updates-or-control-if-all-updates-are-installed/20546/2 "2016-02-12T10:16:11Z")

</div>

For one thing, once my apt module pull request #2944 gets merged you can use « --check --diff » to see the list of packages to be upgraded.

---

<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:** [February 13, 2016, 7:24pm UTC](https://forum.ansible.com/t/debian-ubuntu-show-available-updates-or-control-if-all-updates-are-installed/20546/3 "2016-02-13T19:24:06Z")

</div>

Nice to know, thanks!

Johannes
