The Difference Between Apt and Apt-get on Ubuntu

The Difference Between Apt and Apt-get on Ubuntu

Ubuntu 16.04 is out now, and it’s packed with exciting new changes. You have snap packages, BSD’s popular file system – ZFS  – and other things. One thing you might not have heard about, as little things tend to get lost in the fray, is Apt.

What’s Apt? It’s a new package manager for Ubuntu that is poised to take over for “Apt-get.” It’s built to be more efficient, more secure, and more user friendly. So what is Canonical thinking by introducing Apt? Are there any real differences between Apt and Apt-get? Let’s find out!

Apt was introduced in 16.04 to simplify the package manager and to merge multiple commands into one single command. The functions from “apt-get” have been taken and have been created to function in similar ways in Apt.

Despite the fact that these new Apt commands are created to function similar to the old Apt-get commands, these new commands are not calling the old ones. They’re completely new – fresh commands to interact with packages.

The main reason for this introduction of Apt is at its core: usability. Whether people want it to admit it or not, Apt-get is an old tool, and its usability is questionable at best. Apt has been re-designed from the ground up to be much more efficient, and according to the Apt manual, is designed to “be pleasant for end users.”

So what’s the difference between the two? Well, for starters, you no longer need to type sudo apt-get autoremove, to clear your package cache. You also don’t need to type sudo apt-cache search to find a package.

apt-search-mate

Instead, these commands have been replaced with apt search and apt remove. This is mostly the main difference Apt has: taking commands from Apt-get, etc., that are spread out and bring them together into one concise area.

apt-apt-get-help-screen

This isn’t the only difference, though. Apt also introduces pretty progress bars for installing software. Apt also has little additions that make it smarter than its predecessor. For example: when you update the software sources with Apt-get, you don’t get an easy way to list pending updates. With Apt, just run sudo apt update, then apt list --upgradable. Little things like this add to the differences.

apt-list-upgradeable-packages

They’ve also added some fancy colors and overall just made the whole way packages are manipulated and installed a faster, much-easier-to-use experience. Canonical isn’t ripping out Apt-get yet, but when they do, it’ll be a welcome change.

Here’s a list of the new Apt commands, taken directly from --help in the terminal. These commands are very similar to apt-get commands but designed to be streamlined.

apt-help-screen

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

Looking for more information on Apt? Open your terminal and type man apt. This will print out the entire manual related to apt –  perfect for studying if you’re looking to learn all about this new package manager Ubuntu has introduced.

Apt-get is a tried and true piece of software. It’s been around for a very long time and has gotten both Debian and Ubuntu users through a lot of releases. It’s always been there when you needed to install something, update your software, or even just clean up your software sources on your system.

Still, it’s getting old. The package manager just isn’t up to snuff anymore, and that’s why it’s slowly being replaced with Apt in Ubuntu soon enough. The developers of Ubuntu realize they need to update their package manager for the modern era: make it faster, make it simpler, make it more elegant, and make it more secure.

Do you think Canonical introducing Apt is a good thing? Tell us why or why not below!

Image Credit: muylinux

23 comments

  1. There is a way to list the results as aptitude does? Searching “gcc” for example, will return pages of results.

  2. “you no longer need to type sudo apt-get autoremove, to clear your package cache. You also don’t need to type sudo apt-cache search to find a package.”
    I never had to do that. I just use Synaptic which is the GUI for apt-get. Synaptic does everything Apt does but does it with a pretty interface.

    Is Apt available for other versions of UbuntU (X, K, L)? And if so, how does one get it?
    Is Apt available for Ubuntu-based distros? Where does one get it?
    Is Apt available for Debian-based distros or is it a Canonical only package?

  3. It appears to be available in Debian 8 stable (maybe even installed by default. It is here on my computer and I can’t remember I installed it manually because I usually use aptitude…)

  4. Yes, Canonical’s introduction of apt is a good thing and an improvement over apt-get. But this is only a very little improvement. The real step forward is Linux Mint’s “Software Manager” (mintInstall 7.6.3), which is an excellent application, user-friendly, completely GUI-driven, something like Android’s application managers (Play Store etc). It shows you which packages are installed on your system, user opinions, ratings and a lot of other interesting thinks. And you can visually install/uninstall applications/packages at a mouse click.
    Other interesting applications are synaptic and mint’s Update Manager (mintUpdate – for kernels, ppa’s etc).

    • It’s a very good solution for people who love GUI’s, but for people who love terminals (like myself) apt is a better solution than that.

  5. ZFS was originally developed for Solaris. While it is available for many of the *BSD variants, it’s hardly accurate to refer to it as “BSD’s popular filesystem”.

    • You’re right. It’s hardly accurate to refer to it as ‘BSD’s popular filesystem.” Solaris is not BSD. It’s based on System V. Solaris (SunOS 5) replaced SunOS 4 which is based on BSD.

  6. “The real step forward is Linux Mint’s “Software Manager””
    Synaptic has been doing the same things for years and Synaptic is not limited in usage to only Mint. It is the default package manager installed in most of Debian-based distros. Those using Ubuntu-based distros can install Synaptic from the distro repositories.

    • If you’re using a GUI. Most of us deploying ubuntu in production do not install a GUI and prefer to work on the command line. GUI tools are targeted at the desktop user market, which is far smaller than the server market.

      • “Most of us deploying ubuntu in production do not install a GUI and prefer to work on the command line. ”
        Sorry to disagree. Most Ubuntu users install and use GUI. That is what has made Ubuntu the most popular Linux distro. Ubuntu Server is a very small percentage of all Ubuntu installs. Please do not generalize based on a sample of one, yourself.

  7. Honestly I can’t the difference between apt vs apt-get for me it was more ease to keep the same tool with debian we do need to ha have severe name of tools for the same things

  8. That is great thanks to all and i think that is faster more than before because you don`t type 4 key and this is good.

  9. Can you guys please stop publishing such crappy articles?

    The Apt command is not a new feature in Ubuntu 16.04. It has been out since April 1st of 2014 (https://mvogt.wordpress.com/2014/04/04/apt-1-0/).

    Not only is Ubuntu 16.04 not the first version to get it, it’s not even the first LTS to get it. Ubuntu 14.04 debuted the Apt command on Ubuntu.

  10. I use “apt-cache policy package”. Sorry. I am sticking with apt-*, just because I already learn it and Ubuntu’s apt is no evolution.

  11. I also agree with Ricardo N Feliciano, this looks more like a “alias” for “apt-get”. A good upgrade would be when all linux distributions task forces agree on a standard install and remove packages/libraries to avoid the conflicts when we install a new package or need to “sudo make install” a new build.

    Just as an example: I had to install a xubuntu-desktop package just to compare performance issues with unity and it broke many tweaks I had installed on unity.

    (no spam – please!)

  12. If this is another Ubuntu thing like the Software Center or Mir, then dump it! Software center is dead slow, buggy and Ubunty has been trying hard to not let people see all packages (they might need). Mir is just plain incompatible. Ubuntu is trying so hard to limit what people can install so they can sell their commercial services, it’s a disgrace.

    • Canonical is following in Microsoft’s footsteps by taking universally available applications and creating their own proprietary versions. Mark Shuttlesworth admitted as much when he said they created Mir just so Canonical can control its development. Mir is nothing more than Canonical’s version of Wayland. Shuttlesworth and Canonical are not too keen on cooperating and collaborating on any projects with other developers. They want complete control of all software used in Ubuntu.

Comments are closed.

Sponsored Stories