What is the meaning of the following sentence regarding the difference between apt-get and apt?

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


It means that apt and apt-get have similar functionality, the difference being that apt is intended to be used interactively whereas apt-get is supposed to be used in scripts.

The behavior, effect and output of apt-get are maintained unchanged (that's what "backward compatible" means), so that scripts can rely on them. apt is more free to change with the times and may not function as expected if you run the same script sometime in the future.

Of course, nothing is stopping you from using apt-get interactively. I do. Maybe apt is easier to use interactively, but two commands are more difficult to learn then one command.

See also "What is the difference between apt and apt-get".

  • Thank you AlexP. Can you please clarify in the parenthesis level what do you mean by "interactively"? I could put both in a script and run the script (parenthesis block, script file, or heredoc) and both could use me to install something, so it is unclear to me to phrase "interactively" here... – JohnDoea Apr 13 '17 at 0:11
  • @Benia: Of course you can use both in scripts; but the developers say that for scripting you should use apt-get. The difference is that apt-get is guaranteed to remain compatible, that is, newer versions will not change their output or their behavior, whereas apt is not -- newer versions may introduce changes. apt also is supposed to be easier to use. Of course, in reality people who would benefit from apt's supposed ease of use will prefer graphical utilities... – AlexP Apr 13 '17 at 10:06
  • "Of course, in reality people who would benefit from apt's supposed ease of use will prefer graphical utilities..." Guess I'm an unreal person, then... – fkraiem Apr 13 '17 at 11:40

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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