Ways to Install or Uninstall astyle on Ubuntu 22.04

Updated: August 29, 2022

Artistic Style is a source code indenter, formatter, and beautifier for the C, C++, C++/CLI, Objective-C, C# and Java programming languages. In this guide, I will show you how to install astyle on Ubuntu 22.04.

Requirements to install

  • OS: astyle needs Ubuntu 22.04 to work
  • Privileges: Verify that you can execute the sudo commands line.

Prerequisites to install astyle on Ubuntu 22.04

Install astyle Ubuntu 22.04

astyle 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 astyle using APT

This is one of the most popular methods for installing Ubuntu packages since it is simple to understand, even if you are a Linux novice. Following these steps to get astyle on your Ubuntu 22.04.

Step 1: Update the APT database to download new packages from Ubuntu. Opening the terminal and executing this Linux command:

sudo apt-get -y update

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

sudo apt -y install astyle

Install astyle using Aptitude

Aptitude allows users to view a list of available packages and manage package installation, upgrade, and removal. If you haven’t already installed it on Ubuntu, run this command to do so.

sudo apt install aptitude

After that, you can now install astyle, just following these steps:

Step 1: Update the APT database to fetch new packages from Ubuntu. Launching the terminal and entering the following Linux command:

sudo apt update

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

sudo aptitude -y install astyle

Uninstall astyle on Ubuntu 22.04

Have you ever thought that uninstalling an application from Ubuntu might be challenging? You’re wrong; any program, not just a astyle, can be easily uninstalled by anyone.

If you installed astyle using APT or Aptitude, you could uninstall astyle on Ubuntu by following this step:

sudo apt remove --auto-remove astyle

To uninstall astyle and remove its data and dependencies, you can also use the following command:

sudo apt autoremove --purge astyle

Conclusion

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