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

Just another weblog

Installing packages via APT
Skip to toolbar Sites at Penn State. When you install packages from the command line with sudo apt-get install Philip Mais 1 1 4. Be careful when playing with creating a custom kernel as a new Linux user. It's definitely not something you should be doing as a Linux newbie. R can then be installed:. In order to use this command, the package dlocate must be installed on your system.

Installation

Package management with APT

To un-install software packages without removing their configuration files for later re-use the same configuration. To download and unpack source code of a package to a specific directory, type the following command.

It used to update package cache and checks for broken dependencies. If the package does not exists in the local repository it will return an error code. For example, the following command will remove an installed package with its dependencies.

Please feel free to mention in the comment below. We are thankful for your never ending support. I am Ravi Saive, creator of TecMint. Your name can also be listed here. Submit it here to become an TecMint author. Hi, How can i search through installed applications? In particular I want to search with a keyword in both package name and description for installed package?

You can use the following command to search for a particular packages, for example apache in this case. Sorry if I was not clear. I specifically need to look into list of packages that are installed in my system.

I work in many places offline no Internet access. So how do I re-download all. Your email address will not be published. Notify me of followup comments via e-mail. You can also subscribe without commenting. This site uses Akismet to reduce spam. Learn how your comment data is processed. How to Install Nagios 4. How to Install Ubuntu Twitter Facebook Google Plus Subscribe to our email updates: A Google search can give you the definition for almost any terminal command, as can --help in the terminal.

Many actions that require modifying system files or installing applications require extra permissions to go through. The package lists provide the apt-get utility with important information about the software packages that you can install using apt-get. This may not, however, be the appropriate version, or if the program is new, it might not be available at all.

Thus, when installing software with apt-get, you typically type. Another useful source for information is the help. Running sudo apt-get update simply makes sure your list of packages from all repositories and PPA's is up to date. If you do not run this command, you could be getting older versions of various packages you are installing, or worse, dependency issues.

It is highly recommended to run sudo apt-get update before installing, but it may be skipped if you are really pressed for time unless you have changed repositories or PPAs since the last apt-get update. You need to run apt-get update once before installing new packages as this updates the local repository information. If you are going to install multiple packages shortly after each other, you do not need to run apt-get update.

Also, you can install multiple packages at once if you type sudo apt-get install package1 package Your computer has a list like a catalog that contains all the available software that the Ubuntu servers have available. But the available software and versions might change, so a "update" will hit the server and see what software is available in order to update its local lists or catalogs.

Note that update is diferent from upgrade. Update, as mentioned above, will fetch available software and update the lists while upgrade will install new versions of software installed on your computer actual software updates. When you install packages from the command line with sudo apt-get install Running sudo apt-get update or sudo aptitude update updates this on your local system.

This is the step that actually retrieves information about what packages can be installed, including what updates to currently installed packages packages are available , from Internet sources.

When you install packages from the command-line, it is not, and you should always do this yourself unless you have done so very recently.

Because information about what updated versions of packages are available is obtained by running sudo apt-get update or sudo aptitude update , it is advisable to run this before installing any package, and necessary to run it to install the latest updates, even if you have not added or removed any Software Sources such as a PPA.

Please note that if you are going to perform multiple package management operations around the same time, you don't need to run sudo apt-get update before each one.

It's only if the information hasn't been updated for a while, that you should make sure to run it. So, I guess you can't always assume that apt-get update is run from GUI applications This can be especially problematic if installing a.

Let's consider the example of installing VLC media player on Ubuntu:. If you had logged in as a root user administrator , you don't have to use sudo , because you already have the super user privileges. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service , privacy policy and cookie policy , and that your continued use of the website is subject to these policies.

Home Questions Tags Users Unanswered. I am wondering what sudo apt-get update does? What does it update? Elysium 4, 21 45 Do we always need to run sudo apt-get update command whenever we install packages? What's the disadvantage if we don't do so? JohnnyQ If you do not run that command then you may get an out-of-date package installed.

So I'm assuming it's really no that necessary especially if you are just using basic packages with basic commands that don't get updated usually. Problem in my situation is that apt-get update takes a while, internet here is still primitive. JohnnyQ For some packages it's quite important that your package lists be up to date. Examples of such packages include security-critical software.

JohnnyQ, if your apt-get update is slow, then your apt-get dist-upgrade will also be slow, so that's not really an argument not to do apt-get update first.

Nov 11 '17 at 4: For example, apt-get --help sudo apt-get update essentially has three parts:

The Journal Of A Linux Sysadmin

Leave a Reply

sudo apt-get update sudo apt-get install ensuring that apt-get knows to install the most recent version of the package. Another useful source for information is the food-combination.ga site. sudo apt-get install --only-upgrade How to install a specific version of an application By default, the latest version available in the repository will be . Jun 30,  · Installation commands. apt-get install This command installs a new package. apt-get build-dep This command searches the repositories and installs the build dependencies for. aptitude install Aptitude is an Ncurses viewer of packages installed or available.