Commit f338cbc
fix: improve uninstall script to better handle root directory cleanup
When gpugo is installed as a normal user with GPU_GO_TOKEN (agent mode),
the install script runs `sudo ggo agent register` which creates config
files in /root/.gpugo. During uninstall, these root directories may not
be cleaned up if sudo fails or is unavailable.
Improvements:
1. Better error handling for root directory cleanup
- Explicitly check if removal succeeded
- Capture and report failures
2. Enhanced binary search for unregistration
- Search in multiple common locations (not just 2)
- Include ~/.local/bin and ~/bin in search path
- Show searched paths if binary not found
3. Clear manual cleanup instructions
- If root cleanup fails, show warning banner
- List exact commands needed for manual cleanup
- Help users understand what still needs to be removed
4. More informative messages
- Show which directories were successfully removed
- Warn about permission issues explicitly
This fix addresses user reports of gpugo appearing to be "installed in
both root and normal user" after uninstall. The root directories are
intentionally created during agent mode install (systemd service runs
as root), but now uninstall provides clear guidance when they can't be
automatically removed.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent a05e867 commit f338cbc
1 file changed
Lines changed: 53 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
178 | 179 | | |
179 | 180 | | |
180 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
181 | 187 | | |
182 | 188 | | |
183 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
184 | 201 | | |
185 | 202 | | |
186 | | - | |
| 203 | + | |
187 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
188 | 224 | | |
189 | 225 | | |
190 | 226 | | |
| |||
206 | 242 | | |
207 | 243 | | |
208 | 244 | | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
213 | 255 | | |
214 | | - | |
215 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
216 | 259 | | |
217 | 260 | | |
218 | 261 | | |
219 | | - | |
| 262 | + | |
220 | 263 | | |
221 | 264 | | |
222 | 265 | | |
| |||
0 commit comments