Ways to Uninstall and Install hostsed Ubuntu 22.04

Updated: September 6, 2022

Tool for editing hosts file(default /etc/hosts), you can add or delete a DNS entry via command line shell. Hotsed provides an idemponent command line experience with its ‘add’ and ‘delete’ commands avoiding duplicated or missing entries in the hosts file. In this tutorial, I will show you ways to install hostsed Ubuntu 22.04.

Prerequisites

  • OS: Ubuntu 22.04 is needed for hostsed to work
  • Privileges: Make sure you are able to execute sudo commands.

Prerequisites to install hostsed on Ubuntu 22.04

Install hostsed Ubuntu 22.04

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

Install hostsed using APT

This is a popular method for installing any Ubuntu packages because it is simple to understand, even if you are a Linux beginner. Following these steps to get hostsed on your Ubuntu.

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 -y update

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

sudo apt install hostsed

Install hostsed 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. If you haven’t already installed it on Ubuntu, run this command to do so.

sudo apt -y install aptitude

Then, you can now install hostsed, 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 download new packages from Ubuntu. Launch the terminal and enter the following Linux command:

sudo apt-get update

Step 2: Start the package installation on Ubuntu 22.04. After updating the system, you can install hostsed Ubuntu by executing this command in the terminal.

sudo aptitude -y install hostsed

Uninstall hostsed 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 hostsed.

This command can be used to uninstall hostsed from Ubuntu 22.04 if it was installed using APT or Aptitude.

sudo apt remove --auto-remove hostsed

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

sudo apt autoremove --purge hostsed

Ending

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