NavigationContentFooter
Jump toSuggest an edit

How to manage software packages on Linux

Reviewed on 05 August 2024Published on 11 June 2021

Packages are archives containing binaries, configuration files, and dependency information for software. A package manager automates software installation, upgrades, and configuration, keeping track of all installed packages and their versions.

This guide covers package management on the following distributions:

  • Debian
  • Ubuntu
  • CentOS
  • AlmaLinux

Before you start

To complete the actions presented below, you must have:

  • A Dedibox account logged into the console
  • A created and installed Dedibox server

Debian and Ubuntu: Using APT

On Debian and Ubuntu, use the APT (Advanced Package Tool) package manager.

How to update repositories

Update your package information with the following command:

sudo apt-get update

How to update packages

After updating your repositories, upgrade your packages:

sudo apt-get upgrade
Tip

A reboot is recommended after kernel updates.

How to search for packages

Search for specific software packages, such as MariaDB:

apt-cache search mariadb

How to install a package

Install a package, for example, MariaDB server:

sudo apt-get install mariadb-server

How to keep your system tidy

Remove unused dependencies:

sudo apt-get autoremove

How to uninstall a package

Remove a package, for example, MariaDB server:

sudo apt-get remove mariadb-server

To also remove all dependencies installed with the package:

sudo apt-get autoremove mariadb-server

CentOS and AlmaLinux: Using YUM/DNF

On CentOS and AlmaLinux, use the YUM (Yellowdog Updater, Modified) or DNF (Dandified YUM) package manager.

How to update repositories

Update your package information with the following command:

sudo yum update

Or, if using DNF:

sudo dnf update

How to update packages

After updating your repositories, upgrade your packages:

sudo yum upgrade

Or, if using DNF:

sudo dnf upgrade

How to search for packages

Search for specific software packages, such as MariaDB:

sudo yum search mariadb

Or, if using DNF:

sudo dnf search mariadb

How to install a package

Install a package, for example, MariaDB server:

sudo yum install mariadb-server

Or, if using DNF:

sudo dnf install mariadb-server

How to keep your system tidy

Remove unused dependencies:

sudo yum autoremove

Or, if using DNF:

sudo dnf autoremove

How to uninstall a package

Remove a package, for example, MariaDB server:

sudo yum remove mariadb-server

Or, if using DNF:

sudo dnf remove mariadb-server

To also remove all dependencies installed with the package:

sudo yum autoremove mariadb-server

Or, if using DNF:

sudo dnf autoremove mariadb-server
See also
How to change the root passwordHow to change the language of a Windows Server
Docs APIScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCarreer
© 2023-2024 – Scaleway