Example #1
0
def nopackage(name):
    """
    Require an CRUX Linux package to be uninstalled.

    Example::

        from fabtools import require

        require.crux.nopackage("apache2")
    """

    if is_installed(name):
        uninstall(name)
Example #2
0
def nopackages(packages):
    """
    Require several CRUX Linux packages to be uninstalled.

    Example::

        from fabtools import require

        require.crux.nopackages([
            "perl",
            "php5",
            "ruby",
        ])
    """

    packages = [pkg for pkg in packages if is_installed(pkg)]

    if packages:
        uninstall(packages)