-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall_performance_optimizations.py
More file actions
executable file
·68 lines (58 loc) · 2.24 KB
/
Copy pathuninstall_performance_optimizations.py
File metadata and controls
executable file
·68 lines (58 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env python3
"""
NeuralSync v2 Performance Optimizations Uninstaller
Auto-generated uninstaller script
"""
import os
import shutil
import subprocess
from pathlib import Path
def uninstall():
print("🗑️ Uninstalling NeuralSync v2 Performance Optimizations...")
items_removed = []
# Remove CLI wrapper
cli_file = Path("/usr/local/bin/nswrap")
if cli_file.exists():
try:
if os.access(cli_file.parent, os.W_OK):
cli_file.unlink()
else:
subprocess.run(["sudo", "rm", str(cli_file)], check=True)
items_removed.append(str(cli_file))
except Exception as e:
print(f"Warning: Could not remove {cli_file}: {e}")
# Remove configuration directory
config_dir = Path("/Users/daniel/.neuralsync")
if config_dir.exists():
try:
shutil.rmtree(config_dir)
items_removed.append(str(config_dir))
except Exception as e:
print(f"Warning: Could not remove {config_dir}: {e}")
# Remove cache directory
cache_dir = Path("/tmp/neuralsync_cache")
if cache_dir.exists():
try:
shutil.rmtree(cache_dir)
items_removed.append(str(cache_dir))
except Exception as e:
print(f"Warning: Could not remove {cache_dir}: {e}")
# Restore original nswrap if backup exists
original_backup = Path("/Users/daniel/NeuralSync2/nswrap_original")
original_nswrap = Path("/Users/daniel/NeuralSync2/nswrap")
if original_backup.exists():
try:
shutil.copy2(original_backup, original_nswrap)
original_backup.unlink()
items_removed.append("Restored original nswrap")
except Exception as e:
print(f"Warning: Could not restore original nswrap: {e}")
print(f"✅ Uninstallation complete. Removed {len(items_removed)} items:")
for item in items_removed:
print(f" - {item}")
print("\n📝 Manual cleanup needed:")
print(" - Remove environment variables from shell profile")
print(" - Uninstall Python dependencies if no longer needed:")
print(" pip uninstall aiohttp lz4 psutil httptools")
if __name__ == "__main__":
uninstall()