w3resource logo


web-server

Software management

Secondary Nav

Package management

There are almost 25,000 software packages available in Ubuntu Linux repository. It is recommended that you use a package manager to maintain those installed on your server.

  • Install
  • Remove
  • Resolve dependencies
  • Compile
  • Upgrade

Using apt-get

Install a package named “nmap”:

sudo apt-get install nmap

software-management

after pressing 'y' we get these result

software-management1

Ubuntu is supported by apt-get, aptitude.

Most packages are supported by both, so your choice.

apt

A collection of tools, not a single tool.

apt-get is the most important tool. Used for tasks like:

  • Update the index files from their source
  • Upgrade all installed packages
  • Install a package
  • Remove installed package
  • Source code fetching
  • Build dependencies
  • Checks for broken dependencies
  • Clean the local repository
  • Autoclean only files in the local repository that can no longer be downloaded and are considered useless.

Using apt-get

Already installed, ready to use.

Install a package named “nmap”:

sudo apt-get install nmap

Remove a package named “nmap”:

sudo apt-get remove nmap

Update the apt index (the repositories are listed in /etc/apt/ sources.list):

sudo apt-get update

Upgrade all packages installed:

sudo apt-get upgrade

All actions are recorded in /var/log/dpkg.log

Automatic updates

The “unattended-upgrades” package can automatically install updated packages.

Install it:

sudo apt-get install unattended-upgrades

Define the type of upgrades in / etc/apt/apt.conf.d/50unattendedupgrades

All actions are recorded in /var/log/unattendedupgrades