Skip to content

Commit fd8ea2e

Browse files
committed
Adding readme and uninstall for windows
1 parent 3327509 commit fd8ea2e

File tree

3 files changed

+370
-0
lines changed

3 files changed

+370
-0
lines changed

INSTALLATION.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,3 +409,131 @@ preload = true
409409
```
410410

411411
See [DEVELOPMENT.md](DEVELOPMENT.md) for detailed build instructions and troubleshooting.
412+
413+
---
414+
415+
## Uninstall
416+
417+
### macOS
418+
419+
**Quick Uninstall:**
420+
```bash
421+
curl -fsSL https://raw.githubusercontent.com/kssgarcia/onevox/main/scripts/uninstall_macos.sh | bash
422+
```
423+
424+
**Manual Uninstall:**
425+
```bash
426+
# Stop launchd service
427+
launchctl bootout "gui/$(id -u)" ~/Library/LaunchAgents/com.onevox.daemon.plist
428+
429+
# Remove service file
430+
rm -f ~/Library/LaunchAgents/com.onevox.daemon.plist
431+
432+
# Remove application
433+
rm -rf ~/Applications/Onevox.app
434+
rm -rf /Applications/Onevox.app # If installed system-wide
435+
436+
# Remove CLI symlinks
437+
rm -f /usr/local/bin/onevox
438+
rm -f /opt/homebrew/bin/onevox
439+
rm -f ~/.local/bin/onevox
440+
441+
# Remove config and data
442+
rm -rf ~/Library/Application\ Support/com.onevox.onevox
443+
rm -rf ~/Library/Caches/com.onevox.onevox
444+
rm -rf ~/Library/Logs/onevox
445+
```
446+
447+
---
448+
449+
### Linux
450+
451+
**Quick Uninstall:**
452+
```bash
453+
curl -fsSL https://raw.githubusercontent.com/kssgarcia/onevox/main/scripts/uninstall_linux.sh | bash
454+
```
455+
456+
**Manual Uninstall:**
457+
```bash
458+
# Stop and disable service
459+
systemctl --user stop onevox.service
460+
systemctl --user disable onevox.service
461+
462+
# Remove service file
463+
rm -f ~/.config/systemd/user/onevox.service
464+
systemctl --user daemon-reload
465+
466+
# Remove binary
467+
rm -f ~/.local/bin/onevox
468+
469+
# Remove desktop entry
470+
rm -f ~/.local/share/applications/onevox.desktop
471+
update-desktop-database ~/.local/share/applications 2>/dev/null || true
472+
473+
# Remove config and data
474+
rm -rf ~/.config/onevox
475+
rm -rf ~/.local/share/onevox
476+
rm -rf ~/.cache/onevox
477+
```
478+
479+
---
480+
481+
### Windows
482+
483+
**Quick Uninstall:**
484+
```powershell
485+
# Download and run uninstall script
486+
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/kssgarcia/onevox/main/scripts/uninstall_windows.ps1" -OutFile uninstall_windows.ps1
487+
.\uninstall_windows.ps1
488+
```
489+
490+
**Options:**
491+
```powershell
492+
# Keep configuration files
493+
.\uninstall_windows.ps1 -KeepConfig
494+
495+
# Skip confirmation prompt
496+
.\uninstall_windows.ps1 -Force
497+
498+
# Both options
499+
.\uninstall_windows.ps1 -KeepConfig -Force
500+
```
501+
502+
**Manual Uninstall:**
503+
```powershell
504+
# Stop and remove service (run as Administrator)
505+
sc.exe stop Onevox
506+
sc.exe delete Onevox
507+
508+
# Remove from PATH (requires reopening PowerShell after)
509+
$userPath = [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)
510+
$newPath = ($userPath -split ';' | Where-Object { $_ -ne "$env:LOCALAPPDATA\onevox" }) -join ';'
511+
[Environment]::SetEnvironmentVariable("Path", $newPath, [EnvironmentVariableTarget]::User)
512+
513+
# Remove files and directories
514+
Remove-Item -Path "$env:LOCALAPPDATA\onevox" -Recurse -Force
515+
Remove-Item -Path "$env:APPDATA\onevox" -Recurse -Force
516+
```
517+
518+
---
519+
520+
## What Gets Removed
521+
522+
The uninstaller removes the following on all platforms:
523+
524+
**Binaries:**
525+
- Application executable
526+
- CLI tools and symlinks
527+
528+
**Services:**
529+
- System service/daemon registration
530+
- LaunchAgent (macOS) / systemd service (Linux) / Windows Service
531+
532+
**Data:**
533+
- Configuration files
534+
- Downloaded models (can be large, ~100MB-3GB)
535+
- Transcription history
536+
- Application logs
537+
- Cache files
538+
539+
**Note:** On Windows, use the `-KeepConfig` flag to preserve your configuration and downloaded models if you plan to reinstall later.

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,37 @@ Backend selection is automatic based on model choice (see Configuration below).
9696

9797
For pre-built binaries, see the [Releases](https://github.com/kssgarcia/onevox/releases) page.
9898

99+
### Uninstall
100+
101+
**macOS**
102+
```bash
103+
curl -fsSL https://raw.githubusercontent.com/kssgarcia/onevox/main/scripts/uninstall_macos.sh | bash
104+
```
105+
106+
**Linux**
107+
```bash
108+
curl -fsSL https://raw.githubusercontent.com/kssgarcia/onevox/main/scripts/uninstall_linux.sh | bash
109+
```
110+
111+
**Windows**
112+
```powershell
113+
# Download and run the uninstall script
114+
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/kssgarcia/onevox/main/scripts/uninstall_windows.ps1" -OutFile uninstall_windows.ps1
115+
.\uninstall_windows.ps1
116+
117+
# To keep your config file
118+
.\uninstall_windows.ps1 -KeepConfig
119+
120+
# To skip confirmation prompt
121+
.\uninstall_windows.ps1 -Force
122+
```
123+
124+
The uninstaller removes:
125+
- All binaries and executables
126+
- Service/daemon registrations
127+
- Application data and cache
128+
- Configuration files (unless `-KeepConfig` is used on Windows)
129+
99130
## Quick Start
100131

101132
1. Install OneVox using the command above

scripts/uninstall_windows.ps1

Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
# Onevox Windows Uninstaller
2+
# Run this script in PowerShell
3+
4+
param(
5+
[switch]$KeepConfig = $false,
6+
[switch]$Force = $false
7+
)
8+
9+
# Define paths
10+
$onevoxDir = "$env:LOCALAPPDATA\onevox"
11+
$configDir = "$env:APPDATA\onevox\onevox\config"
12+
$dataDir = "$env:APPDATA\onevox\onevox\data"
13+
$cacheDir = "$env:LOCALAPPDATA\onevox\onevox\cache"
14+
$logsDir = "$env:APPDATA\onevox\onevox\data\logs"
15+
$serviceName = "Onevox"
16+
17+
# Colors for output
18+
function Write-Info {
19+
param([string]$message)
20+
Write-Host "[INFO] $message" -ForegroundColor Green
21+
}
22+
23+
function Write-Warn {
24+
param([string]$message)
25+
Write-Host "[WARN] $message" -ForegroundColor Yellow
26+
}
27+
28+
function Write-Error-Message {
29+
param([string]$message)
30+
Write-Host "[ERROR] $message" -ForegroundColor Red
31+
}
32+
33+
# Check if running as administrator
34+
function Test-Administrator {
35+
$currentUser = [Security.Principal.WindowsIdentity]::GetCurrent()
36+
$principal = New-Object Security.Principal.WindowsPrincipal($currentUser)
37+
return $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
38+
}
39+
40+
# Confirm uninstall
41+
function Confirm-Uninstall {
42+
Write-Host ""
43+
Write-Host "╔════════════════════════════════════════╗" -ForegroundColor Cyan
44+
Write-Host "║ Onevox Windows Uninstaller ║" -ForegroundColor Cyan
45+
Write-Host "╚════════════════════════════════════════╝" -ForegroundColor Cyan
46+
Write-Host ""
47+
Write-Host "This will remove Onevox and all its data." -ForegroundColor Yellow
48+
Write-Host ""
49+
Write-Host "The following will be deleted:"
50+
Write-Host " • Binary: $onevoxDir" -ForegroundColor Gray
51+
Write-Host " • Config: $configDir" -ForegroundColor Gray
52+
Write-Host " • Data: $dataDir" -ForegroundColor Gray
53+
Write-Host " • Cache: $cacheDir" -ForegroundColor Gray
54+
Write-Host " • Service: $serviceName (if registered)" -ForegroundColor Gray
55+
Write-Host ""
56+
57+
if (-not $Force) {
58+
$response = Read-Host "Continue? (y/N)"
59+
if ($response -ne 'y' -and $response -ne 'Y') {
60+
Write-Info "Uninstall cancelled"
61+
exit 0
62+
}
63+
}
64+
}
65+
66+
# Stop and remove Windows service
67+
function Remove-Service {
68+
try {
69+
$service = Get-Service -Name $serviceName -ErrorAction SilentlyContinue
70+
71+
if ($service) {
72+
Write-Info "Stopping service..."
73+
74+
if ($service.Status -eq 'Running') {
75+
if (Test-Administrator) {
76+
Stop-Service -Name $serviceName -Force -ErrorAction SilentlyContinue
77+
Write-Info "Service stopped"
78+
} else {
79+
Write-Warn "Service is running but script is not running as Administrator"
80+
Write-Warn "Please run PowerShell as Administrator to stop the service, or stop it manually:"
81+
Write-Host " sc.exe stop $serviceName" -ForegroundColor Gray
82+
}
83+
}
84+
85+
if (Test-Administrator) {
86+
Write-Info "Removing service..."
87+
sc.exe delete $serviceName | Out-Null
88+
Write-Info "Service removed"
89+
} else {
90+
Write-Warn "Cannot remove service without Administrator privileges"
91+
Write-Warn "Please run PowerShell as Administrator and execute:"
92+
Write-Host " sc.exe delete $serviceName" -ForegroundColor Gray
93+
}
94+
}
95+
} catch {
96+
Write-Warn "Could not query/remove service: $_"
97+
}
98+
}
99+
100+
# Remove from PATH environment variable
101+
function Remove-FromPath {
102+
Write-Info "Removing from PATH..."
103+
104+
try {
105+
# User PATH
106+
$userPath = [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)
107+
if ($userPath -like "*$onevoxDir*") {
108+
$newUserPath = ($userPath -split ';' | Where-Object { $_ -ne $onevoxDir }) -join ';'
109+
[Environment]::SetEnvironmentVariable("Path", $newUserPath, [EnvironmentVariableTarget]::User)
110+
Write-Info "Removed from user PATH"
111+
}
112+
113+
# System PATH (requires admin)
114+
if (Test-Administrator) {
115+
$systemPath = [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::Machine)
116+
if ($systemPath -like "*$onevoxDir*") {
117+
$newSystemPath = ($systemPath -split ';' | Where-Object { $_ -ne $onevoxDir }) -join ';'
118+
[Environment]::SetEnvironmentVariable("Path", $newSystemPath, [EnvironmentVariableTarget]::Machine)
119+
Write-Info "Removed from system PATH"
120+
}
121+
}
122+
} catch {
123+
Write-Warn "Could not remove from PATH: $_"
124+
}
125+
}
126+
127+
# Remove files and directories
128+
function Remove-Files {
129+
Write-Info "Removing files..."
130+
131+
# Remove binary
132+
if (Test-Path $onevoxDir) {
133+
try {
134+
Remove-Item -Path $onevoxDir -Recurse -Force -ErrorAction Stop
135+
Write-Info "Removed binary and installation directory"
136+
} catch {
137+
Write-Error-Message "Failed to remove $onevoxDir : $_"
138+
}
139+
}
140+
141+
# Remove config (unless KeepConfig flag is set)
142+
if (-not $KeepConfig) {
143+
if (Test-Path $configDir) {
144+
try {
145+
Remove-Item -Path $configDir -Recurse -Force -ErrorAction Stop
146+
Write-Info "Removed config"
147+
} catch {
148+
Write-Error-Message "Failed to remove $configDir : $_"
149+
}
150+
}
151+
} else {
152+
Write-Info "Keeping config directory (--KeepConfig flag set)"
153+
}
154+
155+
# Remove data
156+
if (Test-Path $dataDir) {
157+
try {
158+
Remove-Item -Path $dataDir -Recurse -Force -ErrorAction Stop
159+
Write-Info "Removed data"
160+
} catch {
161+
Write-Error-Message "Failed to remove $dataDir : $_"
162+
}
163+
}
164+
165+
# Remove cache
166+
if (Test-Path $cacheDir) {
167+
try {
168+
Remove-Item -Path $cacheDir -Recurse -Force -ErrorAction Stop
169+
Write-Info "Removed cache"
170+
} catch {
171+
Write-Error-Message "Failed to remove $cacheDir : $_"
172+
}
173+
}
174+
175+
# Clean up empty parent directories
176+
$appDataOnevox = "$env:APPDATA\onevox"
177+
if ((Test-Path $appDataOnevox) -and ((Get-ChildItem $appDataOnevox -Recurse | Measure-Object).Count -eq 0)) {
178+
Remove-Item -Path $appDataOnevox -Force -ErrorAction SilentlyContinue
179+
}
180+
}
181+
182+
# Main uninstall function
183+
function Main {
184+
Confirm-Uninstall
185+
186+
Write-Host ""
187+
188+
# Stop and remove service
189+
Remove-Service
190+
191+
# Remove from PATH
192+
Remove-FromPath
193+
194+
# Remove files
195+
Remove-Files
196+
197+
Write-Host ""
198+
Write-Info "✅ Onevox uninstalled successfully"
199+
Write-Host ""
200+
201+
if (-not (Test-Administrator)) {
202+
Write-Warn "Note: Some operations may require Administrator privileges"
203+
Write-Warn "If the service was not removed, run this script as Administrator"
204+
}
205+
206+
Write-Host "You may need to restart your terminal or log out and back in for PATH changes to take effect." -ForegroundColor Gray
207+
Write-Host ""
208+
}
209+
210+
# Run main function
211+
Main

0 commit comments

Comments
 (0)