From 29690f8f6ca90cb6c5483081dbfcc2f262e2b9b1 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 09:52:35 +0000 Subject: [PATCH] feat: Add uninstall script and update docs - Create a standalone `scripts/uninstall.sh` script to completely remove the executable, configuration, and workspace data. - Update `make install` to copy the uninstaller script to the installation path (`picoclaw-uninstall`). - Add an "Uninstallation" section to the `README.md` file. Co-authored-by: TanLuong <28281768+TanLuong@users.noreply.github.com> --- Makefile | 3 +++ README.md | 10 ++++++++++ scripts/uninstall.sh | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100755 scripts/uninstall.sh diff --git a/Makefile b/Makefile index 411cd9dc5..5e263016b 100644 --- a/Makefile +++ b/Makefile @@ -196,6 +196,9 @@ install: build @chmod +x $(INSTALL_BIN_DIR)/$(BINARY_NAME)$(INSTALL_TMP_SUFFIX) @mv -f $(INSTALL_BIN_DIR)/$(BINARY_NAME)$(INSTALL_TMP_SUFFIX) $(INSTALL_BIN_DIR)/$(BINARY_NAME) @echo "Installed binary to $(INSTALL_BIN_DIR)/$(BINARY_NAME)" + @cp scripts/uninstall.sh $(INSTALL_BIN_DIR)/$(BINARY_NAME)-uninstall + @chmod +x $(INSTALL_BIN_DIR)/$(BINARY_NAME)-uninstall + @echo "Installed uninstaller script to $(INSTALL_BIN_DIR)/$(BINARY_NAME)-uninstall" @echo "Installation complete!" ## uninstall: Remove picoclaw from system diff --git a/README.md b/README.md index 568c87e59..a60637a7c 100644 --- a/README.md +++ b/README.md @@ -346,6 +346,16 @@ picoclaw gateway +### Uninstallation + +To completely remove PicoClaw and all of its associated data (including configuration and workspace), you can use the uninstall script that was installed alongside the application: + +```bash +picoclaw-uninstall +``` + +This will automatically remove the executable, your `~/.picoclaw` directory, and the uninstaller script itself. + ## 🔌 Providers (LLM) PicoClaw supports 30+ LLM providers through the `model_list` configuration. Use the `protocol/model` format: diff --git a/scripts/uninstall.sh b/scripts/uninstall.sh new file mode 100755 index 000000000..3e17f74ec --- /dev/null +++ b/scripts/uninstall.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# picoclaw-uninstall +# This script uninstalls PicoClaw and all of its associated data. + +set -e + +# Default installation paths (matching the Makefile) +INSTALL_PREFIX="${HOME}/.local" +INSTALL_BIN_DIR="${INSTALL_PREFIX}/bin" +BINARY_NAME="picoclaw" +PICOCLAW_HOME="${HOME}/.picoclaw" + +echo "Uninstalling PicoClaw..." + +# Remove the executable binary +if [ -f "${INSTALL_BIN_DIR}/${BINARY_NAME}" ]; then + rm -f "${INSTALL_BIN_DIR}/${BINARY_NAME}" + echo "Removed executable: ${INSTALL_BIN_DIR}/${BINARY_NAME}" +else + echo "Executable ${INSTALL_BIN_DIR}/${BINARY_NAME} not found. Skipping." +fi + +# Remove the workspace and configurations +if [ -d "${PICOCLAW_HOME}" ]; then + rm -rf "${PICOCLAW_HOME}" + echo "Removed all workspace and configuration data: ${PICOCLAW_HOME}" +else + echo "Data directory ${PICOCLAW_HOME} not found. Skipping." +fi + +# Remove the uninstaller script itself +SCRIPT_PATH="${INSTALL_BIN_DIR}/picoclaw-uninstall" +if [ -f "${SCRIPT_PATH}" ]; then + rm -f "${SCRIPT_PATH}" + echo "Removed uninstaller script: ${SCRIPT_PATH}" +fi + +echo "PicoClaw uninstallation complete!"