Howto use apt-cache
|
From Linuxconfig.org
apt-cache command belong to a group of apt tools and it comes from Debian package management camp. apt-cache is mostly used with argument "search" which will search all current Debian repository used with current system installation. So lets say that I have just installed new Linux such as Ubuntu or Debian and I need to install some calculator. In this example we install calculator but the same procedure applies also to another packages in range from Apache webserver to open office.
Update package repository list
So, first we need to confirm that our repository list is up to date.
# apt-get update
Search for package name
At this point we know what we want to install and we also know how to install a deb packages. What we do not know is a name of the package. For this purpose we can use apt-cache search <keywords separated by space>.
$ apt-cache search calculator
Well, this search returned 71 potential packages so its very hard to choose which one is most appropriate. We need to narrow down our search:
$ apt-cache search calculator kde
Just because my GUI is KDE I can search for package which is native to KDE environment. There are three hits. In a row first is package name and second is a package description. All I need to do is to install "kcalc" package.
Install package
NOTE: at this point you need to be log in as a superuser ( root ).
# apt-get install kcalc
Not every package you install will appear in your graphical application menu. So you need to run them from a shell or add them to a menu manually. In this case kcalc has been add to application menu automatically.
















