In the early day software was provided either via FTP or mailing lists as source code, along with the required man pages, the necessary configuration files and only a few small files contained the instructions to create a binary (normally in a tar file).
Now a days package manager deals with packages, distributions of software and data in archive files.Package managers are charged with the task of finding, installing, maintaining or uninstalling software packages upon the user's command.
Ubuntu works with the 'Deb' packages as it comes from the Debian linux distribution, and is widely considered the best package format for system-level libraries and applications with rich and dynamic dependencies.
The aim of packaging is to allow the automation of installing, upgrading, configuring, and removing computer programs in a consistent manner.
If a certain package requires a certain resource such as a shared library, or another package, it is said to have a dependency. All modern package management systems provide some method of dependency resolution to ensure that when a package is installed, all of its dependencies are installed as well.Typical functions of a package manager include:
-
Working with file archivers to extract package archives
-
Ensuring the integrity and authenticity of the package by verifying their digital certificates and checksums
-
Looking up, downloading, installing, or updating existing software from a software repository or app store
-
Grouping packages by function to reduce user confusion
-
Managing dependencies to ensure a package is installed with all packages it requires, thus avoiding "dependency hell"
A Linux repository is a collection of software hosted on a remote server and intended to be used for installing and updating software packages on Linux systems.They provide a high degree of security, since the software included is thoroughly tested and built to be compatible with a particular distribution and version. So, you can expect the updates to occur with no unexpected "side effects."
In order to perform the task of package management effectively,you need package manager working at 2 levels:
-
low-level package manager handle the backend the actual installation, upgrade, and removal of package files and dpkg is an example.
-
high-level package manager gives some intelligence to low-level package manager and handle the tasks of dependency resolution and metadata searching -”data about the data”- are performed.Example apt,appitude ,etc.
dpkg can install, remove, provide information about and build *.deb packages but it can’t automatically download and install their corresponding dependencies on Debian-based systems.
dpkg itself is controlled entirely via command line parameters, which consist of exactly one action and zero or more options. The action-parameter tells dpkg what to do and options control the behavior of the action in some way.
Some of the use cases are :
# to install a package
$ dpkg -i file.deb
# to upgrade a package from a compiled file
$ dpkg -i file.deb
# to list installed packages
$ dpkg -l
# to locate a specific package
$ dpkg -l package_name
# to determine if a package is installed
$ dpkg --status package_name
# to view the content of a Package
$ dpkg -c package_name
# to remove a Package
$ dpkg -r package_name
apt provides a simple way to retrieve and install packages, including dependency resolution, from multiple sources using the command line for Debian and derivatives. Unlike dpkg, apt does not work directly with *.deb files, but with the package proper name.
Some of the use cases are :
# to update packages
$ sudo apt update
# to upgrade packages
$ sudo apt upgrade
# to find a package
$ apt search search_string
# to view info about specific package
$ apt show package
# to install package from linux repository
$ sudo apt install package
# to remove packages
$ sudo apt remove package
• AppImage , the format for distributing portable software on Linux without needing superuser permissions to install the application
• Flatpak , package management for Linux offering a sandbox environment in which users can run application
• Snappy , designed to work for internet of things, cloud and desktop computing.