PowerShell tool primarily used to uninstall games and save disk space: it resolves a Windows shortcut (.lnk), safely finds the real install folder, confirms with a size preview, and deletes the folder and the shortcut. Logs actions to DeskPurge_Log.txt.
When you click on a game shortcut, it often points to an .exe buried deep inside nested folders (e.g., D:\Games\MyGame\bin\x64\release\game.exe). The problem: we want to delete the entire MyGame folder, not just the .exe.
DeskPurge's solution:
- Resolves the shortcut to find the real
.exelocation - Walks up the parent folders one level at a time
- Stops when it hits a protected folder (your "stop boundary")
- Deletes the folder right before that boundary
Example: If your shortcut points to D:\Games\CoolGame\bin\game.exe and you've set D:\Games as a protected folder, DeskPurge will walk up from game.exe → bin → CoolGame → STOP (because the next parent is D:\Games, which is protected). It then deletes CoolGame and the shortcut.
Why protected folders? Protected folders are essential safety boundaries. Without them, DeskPurge could accidentally walk up the folder tree and delete much more than intended, potentially your entire game library (there is a confirmation dialog of course, but nothing can be done if you confirm, as the deletion type is permanent). By setting protected folders (like your game library root), you ensure the script only deletes the intended game folder and nothing beyond your chosen stop points.
- Users with games installed outside of launchers or across multiple drives
- People with deep, nested shortcut targets (bin/x64/release, etc.)
- Anyone wanting a fast, safe way to reclaim disk space from old installs
- Power users who like context‑menu workflows; beginner‑safe with confirmations
- Clone the repository
git clone https://github.com/DeonHolo/DeskPurge.git- Configure protected folders (REQUIRED):
- Open
DeskPurge_ProtectedFolders.txtand update it with your actual game library root folders - Example: If your games are in
E:\Media\Games, add that path to prevent deleting the entire library - The file includes common example library locations - remove or modify as needed (no real harm in keeping them there)
- Context Menu (Shift+Right‑Click on .lnk):
- Install the context menu verb so DeskPurge appears when you hold Shift and right‑click a
.lnk:PowerShell -ExecutionPolicy Bypass -File .\Install-ContextMenu.ps1
- After install: hold Shift + Right‑Click a game shortcut (.lnk) → choose “DeskPurge - Uninstall”.
- To remove the verb later, run:
PowerShell -ExecutionPolicy Bypass -File .\Uninstall-ContextMenu.ps1
- The installer targets your local
DeskPurge.ps1and runs it with a hidden window using:powershell.exe -ExecutionPolicy Bypass -NoProfile -WindowStyle Hidden -File "...\DeskPurge.ps1" "%1" - If you move
DeskPurge.ps1later, re‑runInstall-ContextMenu.ps1so the registry points to the new path.
- 🔒 Built-in protections: Root drives (
C:\,D:\, etc.),C:\Windows,C:\Program Files, User Profile, and Desktop are automatically protected - 📁 User-defined boundaries: Add your game library folders to
DeskPurge_ProtectedFolders.txtto prevent deleting entire libraries - ✅ Confirmation dialog: Shows the target folder and estimated size before deleting
- 🚫 Process check: Ensures the game isn't running before deletion
DeskPurge is a fast, workflow‑centric tool; Revo is a deep system uninstaller. Different jobs, different tools.
| Feature | DeskPurge | Revo (Hunter Mode) | Why it matters |
|---|---|---|---|
| Workflow | One‑click context‑menu action | Drag target / multi‑step activation | Speed: instant, low‑friction cleanup |
| Focus | Deletes install folder (filesystem) | Registry + system trace removal | Direct: maximizes immediate disk space reclaimed |
| Automation | Auto‑resolves .lnk targets to game root | Manual drag or path entry | Efficient for bulk shortcut cleanups |
- Core limitation: DeskPurge deletes the install folder and the shortcut only. It does not call launchers or scrub registry/system traces—use Revo for full cleanups.
- WARNING: If you do NOT configure
DeskPurge_ProtectedFolders.txtcorrectly, you can delete entire game libraries. Review and add your library paths before use. - Provided as‑is, with no warranty. Use at your own risk.
- Windows PowerShell 5.1+ or PowerShell 7+
MIT License - see LICENSE for details.