diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py index 81f19c3fdd..2e086dc6f6 100644 --- a/salt/modules/aptpkg.py +++ b/salt/modules/aptpkg.py @@ -386,7 +386,7 @@ def install(name=None, refreshdb = False if salt.utils.is_true(refresh): refreshdb = True - if 'version' in kwargs: + if 'version' in kwargs and kwargs['version']: refreshdb = False _latest_version = latest_version(name, refresh=False, show_installed=True) _version = kwargs.get('version')