How to Uninstall and Install optipng on Ubuntu 22.04

Updated: August 28, 2022

OptiPNG is a PNG optimizer that recompresses the image files to a smaller size. It losslessly reduces the bit depth, the color type and the color palette of the image, runs a suite of compression methods and strategies, and selects the compression parameters that yield the smallest output file. It also recognizes several external file formats like BMP, GIF, TIFF and PNM (PBM, PGM, PPM). I will show you how to install optipng on Ubuntu 22.04 in this tutorial.

Requirements

  • OS: Ubuntu 22.04 or older versions with more than 2GB RAM
  • Privileges: Ascertain that you are able to execute sudo commands.

Prerequisites to install optipng on Ubuntu 22.04

Install optipng Ubuntu 22.04

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

Install optipng 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 instructions to install optipng on your Ubuntu 22.04.

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

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

sudo apt-get install optipng

Install optipng using Aptitude

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

sudo apt -y install aptitude

After that, you can now install optipng by 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. You can now install optipng Ubuntu by executing this command in the terminal.

sudo aptitude install optipng

Uninstall optipng 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 optipng, can be easily uninstalled by anyone.

You can uninstall optipng Ubuntu by running this command if you installed it using APT or Aptitude.

sudo apt remove --auto-remove optipng

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

sudo apt autoremove --purge optipng

Ending

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