Why do people use apt-get instead of apt?

In nearly every tutorial I see, the suggestion is to use apt-get.

apt is prettier (by default), shorter, and generally more intuitive. (apt-cache search vs apt search, for example)

I don't know if I'm missing something because apt just seems better in every way. What's the argument for apt-get over apt for everyday use?

  • 8
    I didn't even know there was a program named apt. So, learning something. However, did we really need another program? We already had dpkg, apt-get, aptitude and all those graphical programs such as Apper, Synaptic etc. What does apt really add? – Mr Lister Mar 4 '17 at 16:29

The apt front-end is a recent addition, it was added in version 1.0 in April 2014. So it's only been part of one Debian stable release, Debian 8. People who've used Debian for longer are used to apt-get and apt-cache, and old habits die hard — and old tutorials die harder (and new users learn old habits from those).

apt is nicer for end users as a command-line tool, although even there it has competition — I prefer aptitude for example. As a general-purpose tool though it's not necessarily ideal, because its interface is explicitly not guaranteed to stay the same from one release to the next, and it's not designed for use in scripts. Thus in any circumstance where instructions may be used in a script, it should be avoided; so it's typically safer to suggest apt-get rather than apt in answers on Unix.SE and similar sites.

  • 1
    So, essentially, the purpose of the suggestion of apt-get (outside of scripts) is more of a sort of "fail-safe" in case something were to change in a new release of apt, aptitude, etc? – Fyeudmadcc Mar 3 '17 at 21:41
  • Thank you both for your thorough answers. It's much appreciated. That tidbit about apt appearing in Jessie was interesting and news to me as well. – Fyeudmadcc Mar 3 '17 at 21:53
  • 8
    Yes, it's a fail-safe, and also a reflex — I know I tend to just use apt-get out of habit. It avoid having to ask what version of Debian (or a derivative) the user has, and what the intended usage is. If you tell someone to use apt-get, it will work everywhere apt is available, and is safe, so you don't need to list the caveats every time; if you tell someone to use apt, you have to say "but you'll need to use apt-get instead if ...". So it's easier to just mention apt-get. (We do see apt more and more in answers here, so things do change.) – Stephen Kitt Mar 3 '17 at 21:57

Indeed, apt is a high level user friendly utilities set to operate with dpkg.
So, it was divided to several packages, where aptitude was the most automated package. I do think that the background was - several development teams, where each of them proposed own ideology. Now, somebody joined all these products into one apt tool, that (as I suppose) can be decrypted as something like Automated Package Tools and goes to Debian Linux thread development team basic concept.
So, if you need to have low-level control, use dpkg and all manual concerning to it.
At the same time, you can use any of apt-* tools or aptitude if you do not want to care about dependencies. Or apt, as Stephen said, appeared in Jessie (I didn't even know about that)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.