How to install and uninstall applications on Ubuntu – A Beginner’s guide

Many newbie seem confused when they want to install an application in Ubuntu and other similar linux distros (sld) for the first time. In this article we will try to clear up any confusion related to this so that you can easily update your Ubuntu with new programs as well as learn the best ways to remove them.

Using Ubuntu Software Center

In the same spirit as Apple App store, Ubuntu also has a default software center from which you can easily install many applications. You will be able to find a software by its name or you can also browse several predefined categories and editor’s picks.

Read: How to Fix : dpkg was interrupted, you must manually run ‘dpkg –configure -a’ to correct the problem

In Ubuntu Unity, just type in ‘Ubuntu Software’. A Red icon pops up as shown below. Simply click on it to open it up.

Another method would be to access the main menu in the desktop and simply click on the same icon as shown below

If you found the application you were looking for, you just need to click on it. This will show the description of the application inside Software Center.

Read: How to open System Settings from the terminal in Ubuntu 18.04?

Once you like the application, simply click on the install button in order to proceed to its installation on your system. You will need to have the right credentials in order to carry on with this step.

Read: 4 Ways to Find Large Files on Linux and Free Up Disk Space

NOTE:

Many non open-source applications which are proprietary software cannot be found in the Ubuntu software center. In order to access this type of software programs, you will need to enable the Canonical Partner repository. Here is what you need to do :

Open up the unity dash and search for software & update (first icon below) .

Read: How to restore GRUB Bootloader in Ubuntu

Once it pops up, select the ‘the other software’ section or tab and enable “Canonical Partners”. See snapshot below for illustration.

Removing software using software center

Uninstalling applications from Ubuntu is simple. You can go to the Ubuntu Software center, click on the Installed section, and find the software you want to remove. Then, click on the remove option to uninstall it.

Ubuntu uninstall package

Read: How to keep Ubuntu clean

Using apt commands

For those who prefer to use the terminal for installing applications, there is an alternative to the Ubuntu Software Center. This method involves running commands in the terminal to install programs, similar to the process of installing through the graphical user interface of the Ubuntu Software Center. To install an application through the terminal, simply open the terminal window on your Ubuntu desktop and enter the appropriate command for the desired application.

For example, if you want to install synaptic program, you just need to run the command below :

sudo apt install synaptic

In other words, you just have the type in the name of the package which corresponds to the application at the end of the sudo apt install command.

sudo apt install package_name

You will need to enter your password for confirmation.

Read: How to hide folders and show hidden files in Ubuntu

You might be prompted at the beginning of the installation process. Just type in Y or y to proceed.

If you are not sure about the package name to install, you might want to consult the corresponding website of the application so that you know what to use as a package name.
Just to let you know that the first word in the command above, i.e. sudo is the instruction which allows you to use ‘admin’ or ‘root’ privileges.

Read: How to solve “ubi-partman failed with exit code 10” On ubuntu 18.04

Removing software using the apt command

To remove an application that has been installed using the terminal, Ubuntu Software Center, or any other method, you can use the apt command. To do so, open the terminal window in your Ubuntu desktop and enter the following command, replacing “package_name” with the name of the application you want to delete: “sudo apt remove package_name”. This will remove the specified application from your system.

sudo apt-get remove package_name

If this was your first time to use the terminal, then it is a pretty good entry exercise for you in order to get accustomed with the command line.

For more on how to use APT commands, you may want to read our article here.

Using .deb Files

Many software publishers provide offer a .deb file in order to let you install their applications.This is much like an executable file in windows. You just need to download the provided .deb file from the vendor website. See example below for the Synaptic application :

Once you have it locally, double click on. This will take you to the Ubuntu software center where you will see the install button.

You need to be careful when downloading the .deb file. You need to make sure you are downloading the file from the official vendor. You also need to know which .deb file corresponds to your system type (32 bit or 64 bit).

For more about how to install a .deb file, you may want to read our article here.

Removing ‘.deb’ applications

To remove a program that was installed using a .deb file, you can use the Ubuntu Software Center and look for the application name. Then, click on the “Remove” button. If the application is not visible in the Software Center, you can use Synaptic Package Manager as an alternative. Synaptic is a user-friendly tool that displays all the programs installed on your system.

In order to install , just visit https://packages.ubuntu.com/xenial/synaptic and download the required deb file. Or simply go to the terminal and issue the command :

sudo apt install synaptic

After the installation , you will be able to install/remove/upgrade any software package in your system.

Using PPA

Personal Package Archives (PPA) provide a way for developers to make their applications available as an apt repository by uploading their source packages to Launchpad. This allows Ubuntu users to easily download these packages as if they were dealing with the official Ubuntu packages. PPA is a useful feature, as only stable and trustworthy applications are included in the official Ubuntu repository.

Here is an example of how to install Krita application :

sudo add-apt-repository ppa:kritalime/ppa

sudo apt update

sudo apt install krita

As you can see above, we added a PPA provided Krita repository and then after updating the package list, we installed the krita package from the corresponding repository.

A GUI PPA application is available to use. You will be able to search for your desired PPA, add and uninstall packages. Make sure though to add PPA only from a trusted source.

Remove software using PPA

Here is quickly what you can do : you can simply issue the following two commands.

sudo apt-get remove krita

sudo add-apt-repository –remove ppa:kritalim/ppa

How to uninstall a program on ubuntu (Krita)

The first one will remove the application that was installed via the PPA while the second removes the PPA from sources.list.

Read: What you need to do to secure Ubuntu

Using source code

Installing software from the source code is a task that is generally reserved for advanced users. It requires a high level of technical knowledge and patience, as the process can be quite time-consuming. While some users may prefer this method, it is generally more efficient to use other methods, such as package managers or PPAs. If you do choose to install software using the source code, here are some steps to guide you through the process.

  • Go to the official vendor website and download the appropriate source code file.
  • Once you have locally, do extract it.
  • In the folder where you extracted the files, look up for a README or INSTALL file. This will guide you through the installation process.
  • Next issue the commands below in the Terminal one at a time in order to install the software:

./configure

make

sudo make install

Note that you won’t receive updates for software that was installed this way unlike applications that were installed from Ubuntu’s repository or via PPAs or via .deb .

Remove software using the source code

The process of removing software that was installed using the source code can be more complicated than other methods. It is important to check if the vendor has provided a specific removal script to make the process easier. It is also not recommended to delete the source code of the application being removed. To uninstall the software, navigate to the directory where the files were extracted and use the appropriate command in the terminal. :

sudo make uninstall

This however might leave your computer in an inconsistent state since the source code might have created other binary files that cannot be removed using this method. This is why this method is highly risky and it is not recommended.

Using dpkg

dpkg is a package manager for Ubuntu and Debian-based systems that allows for the installation, uninstallation, and building of packages. It does not have some of the features of other package managers, such as automatic downloading and installation of packages and their dependencies. In this section, we will go over how to use dpkg to manage installed packages locally. This method is suitable for intermediate users, as it is not as complex as using the source code.

In order to install your desired deb file, open up the terminal and issue the following command:

sudo dpkg -i file_name.deb

Where file_name should be replaced by the one you wish to install. Here is an example command:

sudo dpkg -i google-chrome-stable_current_i386.deb

If you obtain some dependency errors, run the command below :

sudo apt-get install -f

Remove software using dpkg

In order to uninstall a software using dpkg, issue the command below :

dpkg -r packagename.deb

Where packagename.deb should be replaced by your own file. If you want to Repair/Reconfigure the deb installation, simply run the command :

sudo dpkg-reconfigure packagename

Read: How to Resolve the Sub-process /usr/bin/dpkg returned an error code 1 Error in Ubuntu

Using Synaptic Package Manager

To install Synaptic Package Manager on your Ubuntu system, you can use either the Ubuntu Software Center or the terminal. To install it via the terminal, enter the following command: “sudo apt-get install synaptic” This will install the Synaptic Package Manager, which offers a graphical user interface combined with the versatility and power of the apt package management command. It is a useful alternative to the Ubuntu Software Center for installing applications on Ubuntu and similar distributions:

sudo apt install synaptic

Make sure to click Y or y when prompted.

Once your Synaptic Package Manager has been installed, open it up and do the following steps :

Ubuntu synaptic

Search for the software or package and then check the box “Mark for Installation” and finally press “Apply”.

Using Snaps Packages

Snap is a package management tool developed by Canonical that allows users to easily install applications on any Linux distribution. It includes all necessary dependencies and libraries, making it a universal solution for installing software on Linux systems. Snap is used to securely distribute the latest apps and utilities for cloud, desktop, servers, and the internet of things.

In order to install Snap package management environment in case you do not have it already, run the following command :

sudo apt install snapd

Once this is done, you should be able to install the application that you wish using the Snap command as follows :

sudo snap install <package_name>

Using Flatpak

Flatpak is a universal package management tool for Linux that was developed by Alexander Larsson of Red Hat. It provides a cross-platform framework that allows for a single application to be built for all Linux distributions. Flatpak is currently available on Debian, Arch Linux, Fedora, Solus, Mageia, and Ubuntu, with a focus on desktop environments. It offers an alternative method for installing and managing software on Linux systems .

There is an official PPA for Ubuntu (versions older than 16.04, 17.10) which allows you to install Flatpak. Issue the commands below in order to get Flatpak :

sudo add-apt-repository ppa:alexlarsson/flatpak

sudo apt update

sudo apt install flatpak

For the latest Ubuntu version, run the below command only:

sudo apt install flatpak

Flatpak is a universal package management utility that can be used on various Linux distributions, including Debian, Arch Linux, Fedora, Solus, Mageia, and Ubuntu. It is specifically designed for desktop systems and can be accessed through the Ubuntu Software Center or the command line interface. If you prefer a graphical user interface, you can install the Gnome Software plugin and enable Flatpak support to make it easier to use:

sudo apt install gnome-software-plugin-flatpak

Finally you will be able to download .flatpakref file utility from the software vendor website or you can visit FlatHub – Flatpak app store.

Using the Gnome software plugin, you will be able to open a .flatpakref format file in Ubuntu software center upon which you can install or launch the application.

For more on Flatpak, visit : https://flatpak.org/setup/Ubuntu/

Conclusion

There are various ways to install and remove applications on Ubuntu and similar distributions. These methods include using the terminal, Personal Package Archives (PPAs), Ubuntu Software, .deb packages, and the source code. For those who are less experienced with using the terminal, the PPA and Ubuntu Software options may be simpler. However, for more advanced users, installing software using the source code can provide more control over the process. It is important to note that the .deb package method and the source code method should only be used by experienced users.

There are few others though that were not mentioned in this article, like :

  • Pip to install Python based programs

For more on the differences between the 3 big universal package management tools, visit: https://github.com/AppImage/AppImageKit/wiki/Similar-projects#comparison

Courtesy: https://github.com/AppImage/AppImageKit/wiki/Similar-projects#comparison

Courtesy: https://github.com/AppImage/AppImageKit/wiki/Similar-projects#comparison


If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.

 

amin nahdy

Amin Nahdy, an aspiring software engineer and a computer geek by nature as well as an avid Ubuntu and open source user. He is interested in information technology especially Linux based ecosystem as well as Windows and MacOS. He loves to share and disseminate knowledge to others in a transparent and responsible way.

Leave a Reply