Skip to content

A command-line tool to remove Go binaries with ease.

License

Notifications You must be signed in to change notification settings

nicholas-fedor/go-remove

Repository files navigation

go-remove

go-remove Logo

A command-line tool to remove Go binaries with ease

Latest Version CircleCI Codecov Codacy Badge GoDoc Go Report Card GitHub go.mod Go version License

go-remove is a command-line tool for removing Go binaries from standard binary directories (GOROOT/bin, GOBIN, or GOPATH/bin). It supports both direct removal of a specified binary and an interactive TUI (Terminal User Interface) mode for selecting binaries to delete.

Features

  • Direct Removal: Remove a specific binary by name.
  • Interactive TUI: Browse and select binaries to remove from a grid interface.
  • Verbose Logging: Optional detailed output for debugging or confirmation.
  • Platform Support: Handles Windows .exe extensions and cross-platform paths.

Installation

Install go-remove using Go:

go install github.com/nicholas-fedor/go-remove@latest

This places the go-remove binary in your $GOPATH/bin (e.g., ~/go/bin/).

Usage

Direct Removal

Remove a specific binary:

go-remove vhs

With verbose output:

go-remove -v vhs

Target GOROOT/bin instead of GOBIN or GOPATH/bin:

go-remove --goroot vhs

TUI Mode

Launch the interactive TUI to select binaries:

go-remove
  • Use arrow keys (///) or k/j/h/l to navigate.
  • Press Enter to remove the selected binary.
  • Press q or Ctrl+C to quit.

Help

View available options:

go-remove -h

Building from Source

Clone the repository and build:

git clone https://github.com/nicholas-fedor/go-remove.git
cd go-remove
go build -o go-remove ./cmd

Run locally:

./go-remove

Requirements

  • Go 1.16 or later (for module support).

License

This project is licensed under the GNU Affero General Public License v3 — see the LICENSE file for details.

Contributing

Contributions are welcome! Please submit issues or pull requests on GitHub.

Logo

Special thanks to Maria Letta for providing an awesome collection of Go gophers.