Add Remove > AI for the apps Install > AI offers (#7504)
* Add Remove > AI for the apps Install > AI offers Install > AI grew five entries and Remove grew one: Dictation, sitting on its own at the top level. Everything else installed from that menu had to come back out through Remove > Package by name. Mirror the install tree instead. Dictation moves under the new AI submenu where its installer already lives, and ChatGPT Desktop, Grok Bot, LM Studio, Ollama and T3 Code get removers beside it. Each entry is conditional on the thing actually being installed, so the submenu only ever lists what is there. What each remover deletes was read off a machine that had all five installed and launched, not guessed. That matters most for T3 Code, which bootstraps the agents it drives: ~/.claude.json, ~/.grok, ~/.npm and ~/.local/share/opencode all appear the first time it runs, and all of them outlive it, so it takes only ~/.config/t3code and ~/.t3. Grok Bot is the same trap in miniature -- ~/.grokbot is its own, ~/.grok belongs to the Grok CLI. Ollama drops every acceleration variant rather than the one the installer happened to pick, and disables the service before the package, since that is what holds the models open. 🤖 Generated by Opus 5 in Claude Code. * Remove only what these apps own, and only where removal works Three defects from an independent review of the previous commit. ChatGPT Desktop was deleting ~/.cache/codex-runtimes, which belongs to the Codex CLI rather than the desktop app: the `codex` binary resolves its runtime and plugins out of that directory, and it ships in a package this remover does not touch. Removing the desktop app took the CLI's prepared runtime with it, leaving a separate, still-installed tool to rebuild it -- and unable to, offline. Ollama's row appeared whenever the `ollama` command existed, but omarchy-pkg-drop removes exact package names. With ollama-bin, ollama-git or a hand-built binary the entry offered a removal it could not perform: the service went down, /var/lib/ollama and ~/.ollama were deleted, and it reported success with the program still installed. Every acceleration variant depends on the base package, so testing for that package covers each one the installer can produce and nothing it cannot remove. LM Studio keeps its models under a relocatable home, and ~/.lmstudio-home-pointer is the only record of where they went. The remover deleted the pointer and the default path, so a user who had moved their models kept every one of them while being told they were gone. Read the pointer before deleting it, and refuse one aimed at / or at the home directory itself, since following it there would take everything. Co-Authored-By: Codex XHigh <noreply@openai.com> --------- Co-authored-by: Codex XHigh <noreply@openai.com>
This commit is contained in:
co-authored by
Codex XHigh
parent
260a729104
commit
023021ad2d
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Remove the ChatGPT desktop app along with its configuration and caches.
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
set -e
|
||||
|
||||
omarchy-pkg-drop openai-codex-desktop
|
||||
|
||||
# Not ~/.cache/codex-runtimes: the Codex CLI resolves its own runtime under
|
||||
# there, and it ships in a different package that survives this one.
|
||||
rm -rf \
|
||||
"$HOME/.config/Codex" \
|
||||
"$HOME/.cache/Codex"
|
||||
|
||||
echo ""
|
||||
echo "ChatGPT has been removed."
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Remove Grok Bot along with its settings and data.
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
set -e
|
||||
|
||||
omarchy-pkg-drop grok-bot
|
||||
|
||||
# Not ~/.grok: that is the Grok CLI, which is installed and used on its own.
|
||||
rm -rf \
|
||||
"$HOME/.config/Grok Bot" \
|
||||
"$HOME/.grokbot"
|
||||
|
||||
echo ""
|
||||
echo "Grok Bot has been removed."
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Remove LM Studio along with its configuration and every model it downloaded.
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
set -e
|
||||
|
||||
omarchy-pkg-drop lmstudio-bin
|
||||
|
||||
# LM Studio's home is relocatable and the pointer is the only record of where
|
||||
# the models went, so it has to be read before it is deleted with everything else.
|
||||
lmstudio_home=""
|
||||
if [[ -f $HOME/.lmstudio-home-pointer ]]; then
|
||||
read -r lmstudio_home <"$HOME/.lmstudio-home-pointer" || true
|
||||
fi
|
||||
|
||||
rm -rf \
|
||||
"$HOME/.config/LM Studio" \
|
||||
"$HOME/.config/LM-Studio" \
|
||||
"$HOME/.lmstudio" \
|
||||
"$HOME/.lmstudio-home-pointer"
|
||||
|
||||
if [[ -n $lmstudio_home && $lmstudio_home == /* && -d $lmstudio_home ]] &&
|
||||
[[ $lmstudio_home != "/" && $lmstudio_home != "$HOME" ]]; then
|
||||
rm -rf "$lmstudio_home"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "LM Studio and its models have been removed."
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Remove Ollama along with every model it pulled.
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
set -e
|
||||
|
||||
# The service is what holds the models open, so it goes before the package.
|
||||
sudo systemctl disable --now ollama.service 2>/dev/null || true
|
||||
|
||||
# Whichever acceleration variant is installed provides the same command.
|
||||
omarchy-pkg-drop ollama ollama-cuda ollama-rocm ollama-vulkan
|
||||
|
||||
sudo rm -rf /var/lib/ollama
|
||||
rm -rf "$HOME/.ollama"
|
||||
|
||||
echo ""
|
||||
echo "Ollama and its models have been removed."
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Remove T3 Code along with its configuration and workspaces.
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
set -e
|
||||
|
||||
omarchy-pkg-drop t3code-bin
|
||||
|
||||
# T3 Code drives agents that keep their own state -- ~/.claude.json, ~/.grok,
|
||||
# ~/.local/share/opencode -- and those outlive it, so only its own goes.
|
||||
rm -rf \
|
||||
"$HOME/.config/t3code" \
|
||||
"$HOME/.t3"
|
||||
rm -f "$HOME/.config/t3code-flags.conf"
|
||||
|
||||
echo ""
|
||||
echo "T3 Code has been removed."
|
||||
Reference in New Issue
Block a user