What’s New in Apt 1.0?

APT was first released on April 1, 1998 renaming ‘Deity‘. And exactly 16 years later, APT 1.0 was released on April 1, 2014. APT 1.0 version comes with some most awaited features. One of them is the ‘apt’ binary. ‘apt’ comes with commands which are replacement for some popular commands used with ‘apt-get’ and ‘apt-cache’. These replacements come with different configuration options.
Here, I’ve sorted out some commands which come with ‘apt’ binary and what they replace:

  • apt list

Description: It is used to display a list of packages.

What it replaces: dpkg –list
Behavior that differentiates it from counterpart: It supports shell
pattern for matching package names. Supported options are: –installed, –upgradable, –all-versions.
  • apt list packagename -a (–all-versions)
Description: It is used to list every available version of a package.
What it replaces: apt-cache policy packagename
Behavior that differentiates it from counterpart: It doesn’t show policy score.
  • apt search packagename
Description: It searches for the given term/s and display the matching
packages.
What it replaces: apt-cache search packagename
Behavior that differentiates it from counterpart: It sorts matched packages alphabetically. 
  • apt show packagename
Description: It shows the package information for the given package/s.
What it replaces: apt-cache show packagename
Behavior that differentiates it from counterpart: It hide some details that people are less likely to care about; like the hashes. 
  • apt install packagename

Description: It is desired for installation or upgrading.

What it replaces: apt-get install packagename
Behavior that differentiates it from counterpart: It adds progress output during the dpkg run.
  • apt remove packagename

Description: It is identical to install except that packages are removed instead of installed.

What it replaces: apt-get remove packagename

Behavior that differentiates it from counterpart: It adds progress output during the dpkg run.
  • apt update

Description: It is used to resynchronize the package index files from their sources.

What it replaces: apt-get update
Behavior that differentiates it from counterpart: Color output enabled. 
  • apt upgrade
Description: upgrade is used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list. New packages will be installed, but existing packages will never be removed.
What it replaces: apt-get upgrade
Behavior that differentiates it from counterpart: the same as apt-get dist-upgrade –with-new-pkgs.
  • apt full-upgrade

Description: It performs the function of upgrade but may also remove installed packages if that is required in order to resolve a package conflict.

What it replaces: apt-get dist-upgrade
Behavior that differentiates it from counterpart:  A more meaningful name for the dist-upgrade.
  • apt edit-sources

Description: It lets you edit your sources.list file and provides basic sanity checks.

What it replaces: texteditorname /etc/apt/sources.list
Behavior that differentiates it from counterpart:  It edits sources.list using $EDITOR
N.B.:
  • apt 1.0 hasn’t “yet” implemented all the features available under apt-get and apt-cache combined. apt has those commands but some features are still missing e.g. command auto-completion. apt would be yet more ‘complete’ package management tool when those would be fulfilled.
  • Most of the commands would require root permission to work.
  • Replace packagename with name of the package and texteditorname with name of the text editor being used.
  • Use common sense where necessary.

Source: Michael Vogt’s blog

To know about these and more, open terminal and execute the following:
man apt
Using manpages is a good practice.
Advertisements

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