# Ansible, windows, and package management

**URL:** <https://forum.ansible.com/t/ansible-windows-and-package-management/27375>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [April 25, 2018, 4:30pm UTC](https://forum.ansible.com/t/ansible-windows-and-package-management/27375 "2018-04-25T16:30:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bob](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bob/32/9260_2.png) [@bob](https://forum.ansible.com/u/bob)\
**Post date:** [April 25, 2018, 4:30pm UTC](https://forum.ansible.com/t/ansible-windows-and-package-management/27375/1 "2018-04-25T16:30:53Z")

</div>

I find package management on Windows convoluted.

Is there a strategy for managing packages with Ansible when the packages install into the user’s home profile?

When I attempt to uninstall a package that installs into a user’s home profile with Ansible as Administrator things fail.

---

<div class="post-metadata">

**Author:** ![Mike\_Fennemore](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Mike\_Fennemore](https://forum.ansible.com/u/Mike_Fennemore)\
**Post date:** [April 25, 2018, 5:15pm UTC](https://forum.ansible.com/t/ansible-windows-and-package-management/27375/2 "2018-04-25T17:15:55Z")

</div>

Tried using chocolatey with win\_choco?

---

<div class="post-metadata">

**Author:** ![bob](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bob/32/9260_2.png) [@bob](https://forum.ansible.com/u/bob)\
**Post date:** [April 25, 2018, 5:19pm UTC](https://forum.ansible.com/t/ansible-windows-and-package-management/27375/3 "2018-04-25T17:19:48Z")

</div>

Yes, for packages in the chocolatey repository.

---

<div class="post-metadata">

**Author:** ![Mike\_Fennemore](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Mike\_Fennemore](https://forum.ansible.com/u/Mike_Fennemore)\
**Post date:** [April 25, 2018, 6:54pm UTC](https://forum.ansible.com/t/ansible-windows-and-package-management/27375/4 "2018-04-25T18:54:15Z")

</div>

What version of Ansible are you using? Do you have an example of the inventory and playbook results?

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [April 25, 2018, 9:24pm UTC](https://forum.ansible.com/t/ansible-windows-and-package-management/27375/5 "2018-04-25T21:24:35Z")

</div>

Package management on Windows is pretty poor, Microsoft does not have an official way of doing things like yum/apt/dnf. Using win\_chocolatey is the best and easiest way forward but unfortunately not every package has been made to a high standard so you get some problems there. I usually find, running win\_chocolatey with become solves the majority of the issues with the module as it runs like would if you were to do it manually on the host.

Thanks

Jordan
