- Features
- Installation
- Quick Start
- Usage
- Command Reference
- Filesystem Locations
- Building from Source
- Requirements
- Contributing
- License
- Interactive TUI: Browse and select binaries to remove from a grid interface
- Undo Support: Restore the most recently deleted binary with a single command
- Deletion History: Browse and restore any previously removed binary
- Safe Removal: Moves binaries to a trash directory
- Cross-Platform: Works on Linux (XDG-compliant) and Windows
- Verbose Logging: Optional detailed output for debugging
tmp=$(mktemp)
curl -sSfL https://raw.githubusercontent.com/nicholas-fedor/go-remove/main/scripts/install.sh -o "$tmp" && sh "$tmp"
rm -f "$tmp"On Linux, the script installs a native package (.deb, .rpm, .apk, or Arch) when available; otherwise, it extracts the release archive into $HOME/go/bin.
| Variable | Meaning |
|---|---|
VERSION |
Release tag (vX.Y.Z or X.Y.Z). Default: latest. |
INSTALL_DIR |
Directory for archive installs. Default: $HOME/go/bin. |
INSTALL_TYPE |
auto (default), package, or archive. |
Windows: download the .zip from the releases page.
GitHub Releases include distro packages built by GoReleaser (nFPM):
| Format | Distros |
|---|---|
.deb |
Debian, Ubuntu |
.rpm |
Fedora, RHEL, Rocky, openSUSE |
.apk |
Alpine |
.pkg.tar.zst |
Arch, Manjaro |
Install a downloaded package with dpkg -i, rpm -Uvh, apk add --allow-untrusted, or pacman -U. Checksums are in checksums.txt on the same release.
Re-run the script to replace the current install with the latest release (or VERSION=…). Native packages are upgraded in place (dpkg/rpm/apk/pacman) and archive installs overwrite $INSTALL_DIR/go-remove.
tmp=$(mktemp)
curl -sSfL https://raw.githubusercontent.com/nicholas-fedor/go-remove/main/scripts/install.sh -o "$tmp"
# Update
sh "$tmp" update
# Uninstall (native package and/or the stored archive install directory)
sh "$tmp" uninstall
rm -f "$tmp"go install github.com/nicholas-fedor/go-remove@latestThe binary is installed to $GOPATH/bin (typically ~/go/bin/go-remove).
Available architectures: amd64, i386, arm64v8
# Download and extract (replace amd64 with your architecture, and X.Y.Z with the release version)
Invoke-WebRequest -Uri "https://github.com/nicholas-fedor/go-remove/releases/download/vX.Y.Z/go-remove_windows_amd64_X.Y.Z.zip" -OutFile "go-remove.zip"
Expand-Archive -Path "go-remove.zip" -DestinationPath "."
# Move to a directory in your PATH
Move-Item -Path ".\go-remove.exe" -Destination "$env:LOCALAPPDATA\Microsoft\WindowsApps\"# Launch interactive TUI to select binaries
go-remove
# Remove a specific binary
go-remove rm vhs
# Undo the last deletion
go-remove undoRemove a specific binary by name:
go-remove rm vhsWith verbose output:
go-remove -v rm vhsRemove from GOROOT/bin instead of GOBIN/GOPATH/bin:
go-remove --goroot rm vhsLaunch without a command to use the interactive TUI:
go-removeTUI Controls:
| Key | Action |
|---|---|
↑/↓/←/→ or k/j/h/l |
Navigate grid |
Enter |
Remove selected binary |
s |
Toggle sort order (ascending/descending) |
r |
Open deletion history |
q or Ctrl+C |
Quit |
Restore the most recently deleted binary:
go-remove undoBrowse and restore from deletion history:
go-remove restoreHistory View Controls:
| Key | Action |
|---|---|
↑/↓ |
Navigate history |
Enter |
Restore selected binary to original location |
d |
Permanently delete from trash |
u |
Undo most recent deletion |
q |
Return to main view |
| Command | Description |
|---|---|
go-remove |
Open the interactive TUI |
go-remove rm <bin> |
Remove a binary (alias: remove) |
go-remove undo |
Restore the most recently deleted binary |
go-remove restore |
Open the deletion history view |
go-remove version |
Print the version, commit, and build time |
Global flags work with every command:
| Flag | Short | Description |
|---|---|---|
--goroot |
Target GOROOT/bin instead of GOBIN/GOPATH/bin |
|
--log-level |
-l |
Set log level (debug, info, warn, error) |
--verbose |
-v |
Enable verbose output |
--help |
-h |
Show help for any command |
Earlier releases selected the operation with flags. Each one is now a command:
| Before | Now |
|---|---|
go-remove <bin> |
go-remove rm <bin> |
go-remove --undo |
go-remove undo |
go-remove --restore |
go-remove restore |
Deletion history is stored in a Badger KV database:
Linux:
$XDG_DATA_HOME/go-remove/history.badger- Fallback:
~/.local/share/go-remove/history.badger
macOS:
$XDG_DATA_HOME/go-remove/history.badger- Fallback:
~/Library/Application Support/go-remove/history.badger
Windows:
%LOCALAPPDATA%\go-remove\history.badger- Fallback:
%USERPROFILE%\go-remove\history.badger
Trashed binaries are stored in files/ and metadata files (.trashinfo) in info/ in the following Trash locations:
Linux and macOS:
$XDG_DATA_HOME/Trash- Fallback:
~/.local/share/Trash
A relative $XDG_DATA_HOME is treated as unset.
Windows:
%LOCALAPPDATA%\go-remove\trash
GOROOT/bin(when using--gorootflag)GOBIN(environment variable)GOPATH/bin(fromGOPATHenvironment variable)- Default fallback:
~/go/bin(Linux/macOS) or%USERPROFILE%\go\bin(Windows)
git clone https://github.com/nicholas-fedor/go-remove.git
cd go-remove
go build -o go-remove .Run locally:
./go-remove --help- Go 1.27.0 or later
We welcome contributions! Please see CONTRIBUTING.md for detailed guidelines on:
- Setting up your development environment
- Code standards and testing requirements
- Submitting pull requests
- Commit signing requirements
- AI policy
You can also submit issues or pull requests on GitHub.
This project is licensed under the GNU Affero General Public License v3.
Logo Credits: Special thanks to Maria Letta for the awesome Free Gophers Pack.