# Upgrading a list of packages from local .deb files

**URL:** <https://forum.ansible.com/t/upgrading-a-list-of-packages-from-local-deb-files/26198>\
**Category:** Ansible Project\
**Created:** [December 4, 2017, 2:30pm UTC](https://forum.ansible.com/t/upgrading-a-list-of-packages-from-local-deb-files/26198 "2017-12-04T14:30:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrey\_Agenosov](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@Andrey\_Agenosov](https://forum.ansible.com/u/Andrey_Agenosov)\
**Post date:** [December 4, 2017, 2:30pm UTC](https://forum.ansible.com/t/upgrading-a-list-of-packages-from-local-deb-files/26198/1 "2017-12-04T14:30:02Z")

</div>

Hello, I have the issue with upgrading our product on Debian-based systems.

We have already installed packages of the version, for example, 2.0. There are several packages and some of it depend of the other.

When I’m trying to **upgrade the product** from the version 2.0 to the version 2.1, **passing a list of .deb packages, the error occurs because of an unresolved dependency**.

Below there is a _yml_-fragment to illustrate what I do:

- name: Installing packages [apt]  
apt:  
deb=“{{ packages\_to\_install }}”  
state=present  
update\_cache=yes  
when: ansible\_pkg\_mgr == “apt”

I tried to find out what’s going on under the hood by debugging the Ansible’s apt module:

- when iterating over the list of .deb files, for each file there is a check of the package’s version with version of the already installed package with the same name
- if versions are differ, there is a call to the _apt.debfile.DebPackage.check()_ function, which in my case returns false (this is due to the fact that in case of installing a newer version of a package there will be a dependency conflict for another package, which is also part of our product).

**In case of yum, this case passes successfully** - the Ansible’s yum module supports **thansactional update from local .rpm files**.

What will be the right solution for Debian?  
Perform full deinstallation of the product before installing the new version? Or should I patch the Ansible’s apt module?
