3. Check All Dependencies of a Package

This will help you to display raw information about dependencies of a particular package that you specify.

$ sudo apt depends glances

Check Dependencies of Package

4. Search for a Package

The search option searches for the given package name and show all the matching packages.

$ sudo apt search apache2

Search For a Package

5. View Information About Package

This will help you display information about package or packages, run the command below by specifying all the packages that you want to display information about.

$ sudo apt show firefox

Show Package Information

6. Verify a Package for any Broken Dependencies

Sometimes during package installation, you may get errors concerning broken package dependencies, to check that you do not have these problems run the command below with the package name.

$ sudo apt check firefox

Check Package for Broke Dependencies

7. List Recommended Missing Packages of Given Package

$ sudo apt recommends apache2

View Recommended Missing Packages

8. Check Installed Package Version

The ‘version’ option will show you the installed package version.

$ sudo apt version firefox

Check Installed Package Version

9. Update System Packages

This will help you to download a list of packages from different repositories included on your system and updates them when there are new versions of packages and their dependencies.

$ sudo apt update

Update System Packages

10. Upgrade System

This helps you to install new versions of all the packages on your system.

$ sudo apt upgrade

Upgrade System

11. Remove Unused Packages

When you install a new package on your system, it’s dependencies are also installed and they use some system libraries with other packages. The after removing that particular package, it’s dependencies will remain on the system, therefore to remove them use autoremove as follows:

$ sudo apt autoremove

Remove Unwanted Packages

12. Clean Old Repository of Downloaded Packages

The option ‘clean’ or ‘autoclean’ remove all old local repository of downloaded package files.

$ sudo apt autoclean
or
$ sudo apt clean

Clean Package Repository

13. Remove Packages with its Configuration Files

When you run apt with remove, it only removes the package files but configuration files remain on the system. Therefore to remove a package and it’s configuration files, you will have to use purge.

$ sudo apt purge glances

Remove Package Configuration Files

14. Install .Deb Package

To install a .deb file, run the command below with the filename as an argument as follows:

$ sudo apt deb atom-amd64.deb

Install Deb Package

15. Find Help While Using APT

The following command will list you all the options with it’s description on how to use APT on your system.

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

Most of the options in this howto neither work in debian sid (apt 1.4~beta1) or in a fully upgraded Ubuntu 16.10. (apt 1.3.1). And that has nothing to do with apt vs. apt-get. Could the author please point to any sources for commands like ‘apt deb’, ‘apt-check’ or ‘apt version’ or ‘apt content’?

It is actually true that many of the apt options above do not work on Debian or Ubuntu. However, on Linux Mint they look to be working so well, that is the source of the options you see in this How-To, you can test that yourself.

Well, not a big fan of Ubuntu and of Mint here. I just thought, that your headline was a bit off, after trying these commands in Debian. Then someone told me they don’t work in Ubuntu 16.04 either. So I threw 16.10 into a Vbox and …no dice.

Am running Linux Mint 18 which is has Ubuntu 16.04 as its core, and apt content bash seems to be working fine. apt on Linux Mint is perhaps different from the one on Debian, Ubuntu and its derivatives. This could be the could be the reason why you are getting the error.

“apt update” doesn’t install any updated packages (even for system/critical updates), it only downloads the updated list of packages.
The system itself may have a mechanism for regularly applying critical updates regularly, but you would do that using the “apt upgrade” command.

The Linux Mint command ‘apt’ is completely different from the one Debian uses — written by different people at different time. The older Mint version has recently been made to mimic the newer Debian version, but it has many more functions unique to it, like ‘version’ and ‘check’. I’d imagine Ubuntu uses the Debian one but I don’t know for certain.