def is_installed(pkg_name):
    with settings(hide('running', 'stdout', 'stderr', 'warnings'), warn_only=True):
        res = run("dpkg -s %(pkg_name)s" % locals())
        for line in res.splitlines():
            if line.startswith("Status: "):
                status = line[8:]
                if "installed" in status.split(' '):
                    return True
        return False
Get integer location for requested label
dataset/ETHPy150Open ronnix/fabtools/fabtools/deb.py/is_installed--crossover with--dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py/Index.get_loc