Skip to content

Commit 474a3e3

Browse files
andystimeclaude
andcommitted
fix: add /root/.ggo directory cleanup in uninstall script
The uninstall script was missing cleanup for /root/.ggo directory. It was only cleaning up /root/.config/ggo and /root/.gpugo, but the agent can also create /root/.ggo directory which needs to be removed during uninstallation. Changes: - Added /root/.ggo directory cleanup in remove_config() - Updated conditional check to include /root/.ggo - Added /root/.ggo to manual cleanup warning message Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 98ccebb commit 474a3e3

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

scripts/uninstall.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,14 @@ remove_config() {
210210
root_cleanup_failed=true
211211
fi
212212
fi
213+
if [ -d "/root/.ggo" ]; then
214+
if ${SUDO} rm -rf "/root/.ggo" 2>/dev/null; then
215+
info "Removed /root/.ggo"
216+
else
217+
warn "Failed to remove /root/.ggo (permission denied)"
218+
root_cleanup_failed=true
219+
fi
220+
fi
213221
if [ -d "/root/.gpugo" ]; then
214222
if ${SUDO} rm -rf "/root/.gpugo" 2>/dev/null; then
215223
info "Removed /root/.gpugo"
@@ -220,7 +228,7 @@ remove_config() {
220228
fi
221229
else
222230
# Check if root directories exist but we can't remove them
223-
if [ -d "/root/.config/ggo" ] || [ -d "/root/.gpugo" ]; then
231+
if [ -d "/root/.config/ggo" ] || [ -d "/root/.ggo" ] || [ -d "/root/.gpugo" ]; then
224232
warn "Root configuration directories exist but sudo is not available"
225233
root_cleanup_failed=true
226234
fi
@@ -240,6 +248,9 @@ remove_config() {
240248
if [ -d "/root/.config/ggo" ]; then
241249
warn " sudo rm -rf /root/.config/ggo"
242250
fi
251+
if [ -d "/root/.ggo" ]; then
252+
warn " sudo rm -rf /root/.ggo"
253+
fi
243254
if [ -d "/root/.gpugo" ]; then
244255
warn " sudo rm -rf /root/.gpugo"
245256
fi

0 commit comments

Comments
 (0)