def METHOD_NAME(module, slackpkg_path, packages):
    remove_c = 0
    # Using a for loop in case of error, we can report the package that failed
    for package in packages:
        # Query the package first, to see if we even need to remove
        if not query_package(module, slackpkg_path, package):
            continue
        if not module.check_mode:
            rc, out, err = module.run_command("%s -default_answer=y -batch=on \
                                              remove %s" % (slackpkg_path,
                                                            package))
        if not module.check_mode and query_package(module, slackpkg_path,
                                                   package):
            module.fail_json(msg="failed to remove %s: %s" % (package, out))
        remove_c += 1
    if remove_c > 0:
        module.exit_json(changed=True, msg="removed %s package(s)" % remove_c)
    module.exit_json(changed=False, msg="package(s) already absent")