How to Uninstall and Install powerstat Ubuntu 22.04

Updated: September 7, 2022

Powerstat measures the power consumption of a mobile PC that has a battery power source. The output is like vmstat but also shows power consumption statistics. At the end of a run, powerstat will calculate the average, standard deviation and min/max of the gathered data. In this tutorial, I will show you how to install powerstat on Ubuntu 22.04.

Prerequisites to install

  • OS: Ubuntu 22.04 or older versions with more than 2GB RAM
  • Privileges: Make sure that you can run the sudo commands line.

Prerequisites to install powerstat on Ubuntu 22.04

Install powerstat Ubuntu 22.04

powerstat 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 you believe is simple and easy to follow.

Install powerstat using APT

This is one of the popular ways to install any Ubuntu packages because it is simple to understand, even if you are a Linux novice. Following these steps to install powerstat on your Ubuntu 22.04.

Step 1: Update the APT database to download new packages from Ubuntu. Launch the terminal and enter the following Linux command:

sudo apt update

Step 2: Install the package on Ubuntu 22.04. After updating, you can install powerstat Ubuntu by executing this command in the terminal.

sudo apt-get -y install powerstat

Install powerstat using Aptitude

If you didn’t install Aptitude on Ubuntu, you need to install it by executing this command.

sudo apt-get -y install aptitude

After that, you can now install powerstat, 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. Launching the terminal and entering the following Linux command:

sudo apt-get update

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

sudo aptitude install powerstat

Uninstall powerstat on Ubuntu 22.04

Have you ever thought about how difficult it is to uninstall an application from Ubuntu? You are mistaken; anyone can easily uninstall any program, not just a package.

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

sudo apt remove --auto-remove powerstat

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

sudo apt autoremove --purge powerstat

Conclusion

In this guide, I showed you ways to install powerstat on Ubuntu 22.04 and ways to uninstall powerstat too. If you need any help, don’t hesitate to contact me. I’m very glad to answer them.