25 Useful Basic Commands of APT-GET and APT-CACHE for Package Management

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

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

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

62 Responses

  1. tansy says:

    Is there any way to check met/unmet dependencies of package? What I mean is, if I wanted to install some package then I wan to check its dependencies and see which are already met and first of all which are required to download and install?

    For example:

    $ apt-cache depends thunderbird

    is showing only dependencies but how do I know which packages are already installed and which are not?

    • Ravi Saive says:


      There is no such command that will display a installed packages of a dependencies, the only way is to list all installed packages using following command in Ubuntu.

      $ sudo apt list --installed
  2. Fahad says:

    Perfect. It helped me a lot.

  3. JUUKO JOSEPH says:

    how do i become an expert in Linux and UNIX operating system?

  4. JUUKO JOSEPH says:

    I want to be a database administrator but how can u help me

  5. Bronwyn Campbell says:

    My husband has always carried out all the maintenance, unfortunately he is very ill and cannot help me. I am trying to use the 'sudo apt-get clean' command in the terminal, I type it in, hit enter, it asks for the password I enter that and the same line comes up ([email protected]:~$) and nothing happens. What am I doing wrong?

    • Ravi Saive says:


      Running sudo apt-get clean command will remove all the local packages that you’ve download during the package installation, the downloaded files resides under /var/cache/apt/archives directory, it seems empty in your case..

      But this is not the only place, where huge amount of disk space wasted, there are other places such as:

      /var/log directory contains all the system logs, you may want to remove these logs or you can use log-rotation program to lower the amount of logs saved and archived.

      Read more here: https://www.tecmint.com/install-logrotate-to-manage-log-rotation-in-linux/

      Your own Trash directory may be full of files that can be purged on regular time.

      If you still want to clean more space , you can use bleachbit program, read more here: https://www.tecmint.com/bleachbit-a-free-disk-space-cleaner-and-privacy-guard-for-linux-systems/

      • Bronwyn Campbell says:

        Hi Ravi, Thank you for that information. I checked in my Package Manager and it informs me that I have log-rotation already installed. I installed the bleachbit program, then ran the software updater and it still tells me that I need to clear at least 19.9M of space for a 76m update. Is there something else I can try?

        • Ravi Saive says:


          Nothing to worry, just run bleachbit every month twice to clear unwanted downloaded packages and files to clear space…

  6. subindas says:

    Hi Sir, how to get remote desktop in Ubuntu and windows 7

  7. Lawrence Hale says:

    How do I only update amd64 architecture. I tried sudo apt-get update -a=amd64 and it doesn’t work.

  8. John Doe says:

    page is broken while printing

  9. uday says:

    when i type apt-cache pkgnames it says -bash: apt-cache: command not found. Please advise

  10. Oc3lot says:

    This is outdated now. You can just use the apt command.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.