How to Uninstall or Install gox on Ubuntu 22.04

Updated: September 14, 2022

Gox is a cross compiling build tool for Go which makes it possible to produce binaries for foreign platforms without having to install Go on the targeted system. Several operating systems and architectures are supported, while parallel building on multiple cores is possible. In this tutorial, I will show you how to install gox on Ubuntu 22.04.

Prerequisites to install

  • OS: Ubuntu 22.04 or older Ubuntu versions
  • Privileges: Ensure that you are able to execute the sudo commands line.

Prerequisites to install gox on Ubuntu 22.04

Install gox Ubuntu 22.04

gox is one of the popular ways on Ubuntu now so that this tutorial will show you how to install it in various ways. Choose the one that you think is easy and you can follow.

Install gox using APT

This is one of the popular ways to install any Ubuntu packages because it’s easy to follow, even if you are a newbie in Linux. Following these instructions to install gox on your Ubuntu 22.04.

Step 1: Obtain new packages from Ubuntu by updating the APT database. Launching the terminal and entering the following Linux command:

sudo apt -y update

Step 2: Install the package on Ubuntu 22.04. After updating the system, you can now install gox Ubuntu by pasting this command into the terminal and pressing Enter.

sudo apt-get install gox

Install gox using Aptitude

Users can manage their installation, upgrade, and removal of packages with Aptitude and view a list of the packages that are currently available. You must run this command to install it if you haven’t already done so on Ubuntu.

sudo apt-get -y install aptitude

After installing it, you can now install gox, just following these steps:

Step 1: The APT package repository cache needs to be updated before you try to install, update, or remove any packages. Update the APT database to fetch new packages from Ubuntu. Opening the terminal and executing the following Linux command:

sudo apt-get update

Step 2: Start the package installation on Ubuntu 22.04. After updating, you can install gox Ubuntu by pasting this command into the terminal and executing it.

sudo aptitude -y install gox

Uninstall gox on Ubuntu 22.04

Have you ever thought that uninstalling an application from Ubuntu is difficult? You are mistaken; Anyone can easily uninstall any program, not just gox.

If you installed gox using APT or Aptitude, you could uninstall gox on Ubuntu by executing this command

sudo apt remove --auto-remove gox

If you want to uninstall gox and remove its data and dependencies, you can also run the following command:

sudo apt autoremove --purge gox


In this guide, I showed you ways to install gox on Ubuntu 22.04 and ways to uninstall gox too. Please do not hesitate to contact me if you require any assistance. I’m delighted to respond to them.