0

Being a new comer in Ubuntu environment, I am bit confused between the apt-get and apt-cache. Can anyone explain what is difference between apt-get and apt-cache. And when to use the apt-get and apt-cache?

Thanks in Advance!

DRV
  • 103
  • 2
  • Related: [What is apt-cache used for?](https://askubuntu.com/questions/180996/what-is-apt-cache-used-for) – steeldriver Nov 26 '19 at 12:41
  • 1
    Thanks @karel I will delete the post – DRV Nov 26 '19 at 12:42
  • `apt-get` will download (get) & install/remove packages & dependencies etc to your system. `apt-cache` will do none of that, but is used to do searches and the like using the cached database of packages on your system (ie. display meta data, detail about packages without any installation/removing/changes etc) – guiverc Nov 26 '19 at 12:43
  • @Melbius Clicked that solved my problem! – DRV Nov 26 '19 at 13:03

1 Answers1

1

apt-cache is for queries, i.e. for searching packages and getting details like dependencies or versions.

apt-get is for, well getting it, installing, package management in general.

The tasks of apt-get and apt-cache are nowadays handled by apt (via e.g. apt install and apt search).

Check them man entries of either for more details.

FelixJN
  • 2,288
  • 11
  • 17