Wednesday 5 February 2020

Installing and Removing Packages in Linux

Hi All,

Hope you all are doing good.

In this article, we will know about how to install and remove packages in Linux.


A package manager is a tool that allows you to install, update, remove, and otherwise manage Linux distribution-specific software packages.

Different Linux distributions have different package managers and package formats.


Only root or user with sudo privileges can install and remove packages.


Ubuntu and Debian(apt command)

               Advanced Package Tool or APT is a package management system used by Debian-based distributions.

There are several command-line package management tools in Debian distributions with apt and apt-get being the most used ones.


Before installing a new package first, you need to update the APT package index:

apt-get update

The APT index is a database that holds records of available packages from the repositories enabled in your system.


To upgrade the installed packages to their latest versions run:

apt-get upgrade

Installing packages is as simple as running:

apt-get install package_name

To remove an installed package, enter:
apt-get remove package_name

CentOS and Fedora(dnf (or) yum command)
          RPM is a powerful package management system used by Red Hat Linux and its derivatives such as CentOS and Fedora. 

RPM also refers to the rpm command and .rpm file format.


To install a new package on Red Hat based distributions, you can use either yum or dnf commands:

yum install package_name

Note: Starting from CentOS 8 dnf replaced yum as the default package manager. dnf is backward compatible with yum.

To upgrade the installed packages to their latest versions, type:

yum update package_name

Removing packages is as simple as:
yum remove package_name

Thanks for reading this article!!

No comments:

Post a Comment

Intoduction to Flutter

Hi All, I hope every one is doing good In this article, we will know about the introduction of Flutter.