def METHOD_NAME(software_manager, cmd, package):
    result = "pass"
    stderr = ""
    if software_manager.check_installed(package):
        if software_manager.remove(package):
            stdout = MESSAGES[cmd]["success"] % package
        else:
            # check if the error is a false negative because of package
            # installation collision
            if not software_manager.check_installed(package):
                stdout = MESSAGES[cmd]["success"] % package
            else:
                result = "error"
                stdout = ""
                stderr = MESSAGES[cmd]["fail"] % package
    else:
        stdout = MESSAGES["check-installed"]["fail"] % package
    return result, stdout, stderr