Questions tagged [apt-get]

GENERAL APT-GET SUPPORT IS OFF-TOPIC. Support questions may be asked on https://superuser.com. apt-get is a command-line tool used to work with Advanced Packaging Tool (APT) of Debian-based Linux distros and for performing actions such as installing or upgrading a package.

The apt-get command is a powerful command-line tool used to work with Debian's Advanced Packaging Tool (APT) performing such functions as installation of new software packages, upgrade of existing software packages, updating of the package list index, and even upgrading the entire Debian system.

Being a simple command-line tool, apt-get has numerous advantages over other package management tools available in Debian for server administrators. Some of these advantages include ease of use over simple terminal connections (SSH) and the ability to be used in system administration scripts, which can in turn be automated by the cron scheduling utility.

Examples

  • Install a Package: Installation of packages using the apt-get tool is quite simple. For example, to install the network scanner nmap, type the following:

    sudo apt-get install nmap
    
  • Remove a Package: Removal of a package or packages is also a straightforward and simple process. To remove the nmap package installed in the previous example, type the following:

    sudo apt-get remove nmap
    

[Tip] Multiple Packages: You may specify multiple packages to be installed or removed, separated by spaces. Also, adding the --purge options to apt-get remove will remove the package configuration files as well. This may or may not be the desired effect so use with caution.

  • Update the Package Index: The APT package index is essentially a database of available packages from the repositories defined in the /etc/apt/sources.list file. To update the local package index with the latest changes made in repositories, type the following:

    sudo apt-get update
    
  • Upgrade Packages: Over time, updated versions of packages currently installed on your computer may become available from the package repositories (for example security updates). To upgrade your system, first update your package index as outlined above, and then type:

    sudo apt-get upgrade
    

Further Reading

For further information about the use of APT, read the comprehensive Debian APT User Manual or type in command-line:

apt-get help  
1055 questions
0
votes
2 answers

apt-get unusable because of virtuoso-opensource-7.0-common

On our server we have Virtuoso 6.1 installed but somehow Ubuntu tries to install Virtuoso 7 as well (or maybe someone tried to install it). In any case, now apt-get is not usable at all and proposes to be fixed with apt-get -f install which fails…
Konrad Höffner
  • 11,100
  • 16
  • 60
  • 118
0
votes
2 answers

What to do when Installation can't find a library or program?

I am a pretty good programmer and I have been working with Linux for 10+ years, but sometimes when trying to build programs from source I hit a brick wall. The current problem occurs when trying to build vlc, it claims that /usr/bin/ld: cannot find…
puk
  • 16,318
  • 29
  • 119
  • 199
0
votes
0 answers

I can't uninstall Postgresql-9.2

I have some GIS packages installed last time, and Postgresql-9.2 has just been installed along Postgresql-9.1. But when ever I do on upgrade now, It does finish like this : $ sudo apt-get dist-upgrade 100% Preconfiguring packages ... 0.5_i386.deb)…
iMitwe
  • 1,218
  • 16
  • 35
0
votes
2 answers

apt-get failed to fetch error

I am trying to use apt-get. I run the following command apt-get update But I get this error Err http://all.repository.backtrack-linux.org revolution Release.gpg …
Matt
  • 974
  • 1
  • 13
  • 31
0
votes
1 answer

apt-pin locally built packages

I have patched and recompiled a debian package. By default when I upgrade, apt wants to upgrade it with the SAME version from the repository instead. Now, I want to convince it (by using apt-pinning, and not hold) to keep the local package if the…
LtWorf
  • 7,286
  • 6
  • 31
  • 45
0
votes
0 answers

enabling flags on an apt-get installed package (libnetcdf-dev)

Hopefully this is a really easy question, but I am having trouble working it out - I am installing a program which requires netcdf version 4 or later with DAP enabled. I already have libnetcdf-dev installed via apt-get. How can I check whether DAP…
BexERoss
  • 5
  • 4
0
votes
1 answer

How to install all the packages that are on machine A onto machine B?

I have a machine that has a bunch of user installed packages on top of a fresh Ubuntu 12.04 LTS install. I'd like to make a few machines than are essential clones, but manually looking up all the packages would be very burdensome. Is there some way…
Chris
  • 9,603
  • 15
  • 46
  • 67
0
votes
2 answers

what exactly does apt -get do in linux?

I'm a beginner with Linux. I have on numerous occasions used apt-get, but my question is what exactly does it do? If I'm using apt-get "some random application", what exactly is this doing? I guess I'm confused where it's getting the application…
david
  • 6,303
  • 16
  • 54
  • 91
0
votes
1 answer

Getting Warning while installing flink on MacBook "There is no C compiler on your system"

To get support I am installing fink on my MacBook Pro. After execute bootstrap script I am getting following error log Checking package... looks good (fink-0.35.1). Checking system... i386-apple-darwin12.4.0 This system is supported and…
CoDe
  • 11,056
  • 14
  • 90
  • 197
0
votes
4 answers

How do you find out which packages installed has `apache2` as its dependency?

When installing softwares like nginx on an Ubuntu 12.04 server, apache2 appears to be installed as one of the dependency which is not what we need. Question: How do you find out which packages installed has apache2 as its dependency?
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
0
votes
1 answer

How to install the latest Scrapyd package?

I notice that the latest stable version of scrapy was released last week(2013-08-09). After updating scrapy to version 0.18, the previous installed scrapyd-0.17 was uninstalled by apt-get(Ubuntu 12.04) automatically. Is there a scrapyd-0.18? How to…
kev
  • 155,172
  • 47
  • 273
  • 272
0
votes
0 answers

apt-get doesn't work on Raspbian 3.6.11+

When I try to do an apt-get (install, update or upgrade no matter) my Raspberry does nothing. I checked my /etc/apt/sources.list and updated it with the mirrors on Raspbian.org. Is someone knows what's happenning ? Thanks a lot in advance !
Vinestro
  • 1,072
  • 1
  • 10
  • 32
0
votes
2 answers

Ploblem in installing php5-curl

I am trying to install curl module of php by following command on my Ubuntu machine- sudo apt-get install php5-curl But it is not getting installed and I am getting following error messages on console. Could you assist me and explain what is…
piyush
  • 976
  • 4
  • 13
  • 28
0
votes
1 answer

Ubuntu 12.04 package dependency

I have following problem :~$ sudo apt-get autoremove Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet…
0
votes
1 answer

Trying to install openjdk-7 on Debian 6, dependencies provide some errors

I am trying to install Java 7 on Debian 6.0 via SSH. Here is what I type and what happens when I enter the commands: http://puu.sh/3fOj8.jpg As you can see the apt-get -f install gives some error messages, which means I cannot continue to try to…
Expression93
  • 3
  • 1
  • 5