def nopackages(pkg_list):
 pkg_list = [pkg for pkg in pkg_list if is_installed(pkg)]
 if pkg_list:
  uninstall(pkg_list)

def nopackages ( pkg_list ) : pkg_list = [ pkg for pkg in pkg_list if is_installed ( pkg ) ] if pkg_list : uninstall ( pkg_list )
require several deb packages to be uninstalled .