39

I installed many packages from sudo apt-get install but when I typed sudo apt --help it gave a direct option of doing installation by sudo apt install [package name]... So, what is the difference between the two ? are there any issues if I don't use 'get' along with 'apt'.

1

1 Answer 1

44

Not much. apt is a new command that supposed to merge several functions from apt-get and apt-cache into one command. It's still a little rough around the edges but here's the command listing from --help:

Basic commands: 
 list - list packages based on package names
 search - search in package descriptions
 show - show package details

 update - update list of available packages

 install - install packages
 remove  - remove packages

 upgrade - upgrade the system by installing/upgrading packages
 full-upgrade - upgrade the system by removing/installing/upgrading packages

 edit-sources - edit the source information file

The equivalent functions are designed to work in similar ways but it's not a proxy command (it's not calling the old ones - it's a new interface directly onto the Apt libraries) so there may be some edge-case changes.

There are also some obvious omissions (download, policy, etc) that power-users will miss and there are a whole raft of undocumented commands (purge still works but I can't find anything on it).

16.04 Update: A lot of the omissions have now been included but aren't yet documented, nor do they have Bash-completions. It's a shame it's taking this long to implement functionality that already exists in the codebase but oh well. My advice is that if you're used to an apt-{get,cache} command, try it on apt. It might work.


There's also a DIFFERENCES TO APT-GET(8) section in the man apt page that's interesting:

   The apt command is meant to be pleasant for end users and does
   not need to be backward compatible like apt-get(8). Therefore
   some options are different:

   ·   The option DPkgPM::Progress-Fancy is enabled.

   ·   The option APT::Color is enabled.

   ·   A new list command is available similar to dpkg --list.

   ·   The option upgrade has --with-new-pkgs enabled by default.

And if you want Bash-completions, I've had an attempt as writing a completions file for it already. These are included with later Ubuntu installs.

2
  • 5
    How about aptitude?
    – rosencreuz
    Mar 11, 2016 at 6:58
  • 1
    That's from a completely different codebase. Functionally it will also automatically autoremove after doing package operations.
    – Oli
    Mar 11, 2016 at 8:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .