>Software/Package Management in Ubuntu/debian


Ubuntu’s package management system is derived from the same system used by the Debian GNU/Linux distribution. The package files contain all of the necessary files, meta-data, and instructions to implement a particular functionality or software application on your Ubuntu computer.
Debian package files typically have the extension ‘.deb’, and typically exist in repositories which are collections of packages found on various media, such as CD-ROM discs, or online. Packages are normally of the pre-compiled binary format; thus installation is quick and requires no compiling of software.

dpkg – dpkg is a package manager for Debian based systems. It can install, remove, and build packages, but unlike other package management system’s, it can not automatically download and install packages or their dependencies. I shall show examples of dpkg to manage locally installed packages:

To list all packages installed ==> dpkg -l
To list all files installed by package specified as argument ==> dpkg -L {package-name}
To install local package ==> sudo dpkg -i {package-name}
To unistall a package ==> sudo dpkg -r {package-name}

There are lot of other options also which we can use with dpkg. For more details refer to man page of dpkg.

Apt-Get – The apt-get command is a powerful command-line tool used to work with Ubuntu’s Advanced Packaging Tool (APT) performing such functions as installation of new software packages, upgrade of existing software packages, updating of the package list index, and even upgrading the entire Ubuntu system.
Apt-get maintains a list of packages available on repositories specified in /etc/apt/sources.list file. Unlike dpkg Apt-get automatically download the package from repository if available.

To install a new package ==> sudo apt-get install {package-name}
To remove a package ==> sudo apt-get remove {package-name}
To update index of packages ==> sudo apt-get update
To upgrade packages ==> sudo apt-get upgrade
You can find more detailed information on apt-get by typing man apt-get.

There are other tools also available like Aptitude to do all this. Ubuntu have very good graphical interfaces to do all above written stuff but if you are a Linux fan, you would love to do it from Command-line

Managing repositories for apt-get – In addition to the officially supported package repositories available for Ubuntu, there exist additional community-maintained repositories which add thousands more potential packages for installation. Two of the most popular are the Universe and Multiverse repositories. These repositories are not officially supported by Ubuntu, but because they are maintained by the community they generally provide packages which are safe for use with your Ubuntu computer.

  • Packages in the Multiverse repository often have licensing issues that prevent them from being distributed with a free operating system, and they may be illegal in your locality.
  • Be advised that neither the Universe or Multiverse repositories contain officially supported packages. In particular, there may not be security updates for these packages.

You can add/remove repositories either from UI by going to System->Administration->Software Sources or by editing /etc/apt/sources.list file.

This entry was posted in Apt-get, Linux, Package Management, Ubuntu. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s