How to install software packages on Debian-Ubuntu: apt-get
In this tutorial, we shall see how to install software packages under Debian and Ubuntu. In the program, we shall have a look at already-installed packages, search packages, information related to software packages, how to update packages and the software list.
List of installed software packages
To visualize the list of installed packages, we use the following command
To visualize an installed package whose name is scilab for example, we use the previous command and a redirection (or pipeline) to the ‘grep’ command. Practically, we have:
Description of installed software packages
The description of the set of installed packages is obtained via the command
List of available software packages
The list of available packages is obtained as follows:
We clearly see that the list is not in alphabetical order. To resolve this issue, we redirect and sort the output:
Searching a software package: apt-cache search
To search a software package, we proceed as follows:
This command displays software packages containing the expression flashplayer.
Properties and information of a software: apt-cache show
To display information related to a package, for instance the flashplayer-mozilla package, we proceed as follows:
Note that the {exact} name of the package should be entered ! For example,
does not yield any result since flash is not he name of a package.
Installing a software: apt-get install
Assume we want to install firefox. We type:
Removing a software: apt-get remove
To uninstall a package, we can proceed in two ways. Either 1) we uninstall only the software or 2) the software and its configuration files. In the first case, assuming we want to uninstall the mplayer software, we type:
In the second case, if we want to uninstall both ‘mplayer’ and its configuration files, we type:
Updating the software list: apt-get update
Updating a list of software is not the same as updating the software {per se}. Only the list is actually updated:
Updating the software: apt-get upgrade
The upgrade command installs the most recent versions of all packages on the system.
To simulate an update installation, i.e. to see which software will be updated, we type:
Smart software update: apt-get dist-upgrade
The dist-upgrade command has the same effect as the ‘upgrade’ except that a smart management is used in changes of dependencies in new versions: conflict resolution and discarding less important packages for more important ones, for example.
If you found this post or this website helpful and would like to support our work, please consider making a donation. Thank you!
Help Us