
___x_cmd_openclaw___uninstall(){
    case "$1" in
        -h|--help)      ___x_cmd help -m openclaw  --uninstall "$@";    return 0 ;;
    esac

    openclaw:info "Remove service + state + workspace + app"
    ___x_cmd_cmds openclaw uninstall --all --yes --non-interactive || return $?

    openclaw:info "Remove the CLI install"
    if [ -f "$HOME/.npm/bin/openclaw" ]; then
        ___x_cmd_cmds npm rm -g openclaw
    elif  [ -f "$HOME/.pnpm/bin/openclaw" ]; then
        ___x_cmd_cmds pnpm remove -g openclaw
    elif  [ -f "$HOME/.bun/bin/openclaw" ]; then
        ___x_cmd_cmds bun remove -g openclaw
    fi

    [ ! -f "/Applications/OpenClaw.app" ] || ___x_cmd rmrf /Applications/OpenClaw.app

    openclaw:info "Kill the process"
    ___x_cmd_cmds pkill -9 openclaw
}

