Short answer: you don't.
Long answer: from the man pages:
apt
(Advanced Package Tool) is the command-line tool for handling
packages. It provides a commandline interface for the package
management of the system. See also apt-get(8) and apt-cache(8) for
more low-level command options.
apt-get
is the command-line tool for handling packages, and may be
considered the user's "back-end" to other tools using the APT
library. Several "front-end" interfaces exist, such as aptitude(8),
synaptic(8) and wajig(1).
So to apt
and apt-get
are two tools which are part of the APT
library. apt
can be used to perform some functions and apt-get
others. They have some overlap. apt
covers all the common options a basic user would need. apt-get
contains more low-level functions that a sysadmin would use.
As per the full man page of the apt
tool, it does not have a command to auto remove unused package. One has to use apt-get
(or possibly another front-end interface).
apt-get
was considered buggy - it initially didn't handle dependencies properly, so people usedaptitude
. This then took a swing, andapt-get
was considered the more reliable way to install things, whileaptitude
had bugs in Ubuntu. Apparentlyapt
was started whenapt-get
was in version1.0.0
or something. You're right it basically looks like a neater API for the same features asapt-get
,apt-cache
anddpkg
, but one of the systems guys here at Canonical told meapt
was now considered the better one to use.apt list | head
and got the following warning:WARNING: apt does not have a stable CLI interface yet. Use with caution in scripts.