I have some questions about the APT package manager.
As I understand we have repositories URLs located at
apt-get update is called, apt tries to connect to all specified repositories in the file and download information about those repositories about what programs are available and so on.
It caches all retrieved data locally in order to use it later without making internet requests to the repository.
apt-get install is called it searches local cache package list from available repositories and if package is not found it does nothing except display an error.
apt-get search also looks into local cache and doesn't make any requests to the internet.
Am I right? I am not sure about commands that make requests instead of searching data in the local cache.
Also, what is the difference between
apt-cache search and
apt search? I can guess they both use the local cache.