diff --git a/library/packaging/apt b/library/packaging/apt index d93835f5ae6..27c0ca4f920 100644 --- a/library/packaging/apt +++ b/library/packaging/apt @@ -218,7 +218,7 @@ def remove(m, pkgspec, cache, purge=False): purge = '--purge' else: purge = '' - cmd = "%s -q -y %s remove %s" % (APT_GET_CMD, purge,packages) + cmd = "%s %s -q -y %s %s remove %s" % (APT_ENVVARS, APT_GET_CMD, DPKG_OPTIONS, purge, packages) if m.check_mode: m.exit_json(changed=True)