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 environment variables when spawning "debian rules" file

What are the environment variables made available to debian/rules (often make) when spawned by apt-get during installation of a package under Ubuntu? I am specifically after the environment variables that would pertain to Gnome's configuration…
jldupont
  • 93,734
  • 56
  • 203
  • 318
0
votes
2 answers

Tomcat & CORS exception

After some issues I completely reinstalled tomcat7 with apt-get and I'm now with v7.0.52. When I try to start the server though I get the following exception: Feb 27, 2014 11:09:06 AM org.apache.catalina.core.StandardContext filterStart SEVERE:…
Doidel
  • 1,743
  • 1
  • 14
  • 22
0
votes
1 answer

Installing blender 2.69 on ubuntu 12.04

It seems the previous method of using sudo add-apt-repository ppa:irie/blender sudo apt-get update sudo apt-get install blender No longer works as that contains 2.66. Probably because 2.69 has been officially released. Anyway, I downloaded the…
Jared Joke
  • 1,226
  • 2
  • 18
  • 29
0
votes
2 answers

apt-get update debian error

I tried setting up Debian 7 (32 bit) on my vps. When I run apt-get update on the shell, I see the an error. Can someone please help try to get it fixed? Below are the contents of my sources.list and the…
DataRiver
  • 188
  • 1
  • 8
  • 21
0
votes
1 answer

Multiple connections with aptitude-faster downloads

I'm wondering whether there is a way to establish multiple connections with aptitude with the aim of increasing download speed. Since I couldn't find such a functionality in aptitude man page (in my limited knowledge), I would rephrase my question:…
Arman
  • 927
  • 3
  • 12
  • 32
0
votes
2 answers

How can I remove older kernel in linux-generic-lts-raring series without installing a new one in the same series?

I have an vps running ubuntu 12.04 with kernel 3.8.0-34 in linux-generic-lts-raring series. In this kernel series, there is a newest version 3.8.0-35. Since I already installed an linux-generic-lts-saucy 3.11.0-15 kernel, I decide to remove the old…
clc3123
  • 43
  • 1
  • 5
0
votes
1 answer

Failing to get Debian 7 i836 updates

I was trying to install teamviewer on Debian 7. But when I was doing: dpkg --add-architecture i836 ; apt-get update I was getting the following Error : W: Failed to fetch http://security.debian.org/dists/wheezy/updates/Release Unable to …
L0aD1nG
  • 111
  • 1
  • 10
0
votes
0 answers

gcc deleted by new aptitude package installation?

i was running my makefile which was using gcc perfectly fine until it stopped after a second configuration to tell me zlib is missing. so i installed the lib64z1-dev package from aptitude and proceeded to run make again when it stopped by telling me…
A1A2A3A4
  • 413
  • 1
  • 5
  • 11
0
votes
2 answers

Upgrade/install Java version in a Mac

I am on a Mac. My current Java version is "1.6.0_65". Therefore i want to upgrade it to the latest. I typed the following command on my Mac terminal. sudo apt-get install oracle-java7-installer The error i got is sudo: apt-get: command not found.…
Sharon Watinsan
  • 9,620
  • 31
  • 96
  • 140
0
votes
1 answer

apt-get --simulate dist-upgrade without notice

I want to do simulation of dist-upgrade without notice about simulation: NOTE: This is only a simulation! apt-get needs root privileges for real execution. Keep also in mind that locking is deactivated, so don't depend on…
KPACHblu
  • 51
  • 1
  • 12
0
votes
1 answer

What have I got when using apt-get source here?

I am trying to get the source code of gnome-calculator. $ apt-get source gnome-calculator Reading package lists... Done Building dependency tree Reading state information... Done NOTICE: 'gnome-calculator' packaging is maintained in the…
Yishu Fang
  • 9,448
  • 21
  • 65
  • 102
0
votes
1 answer

Error installing lib on Ubuntu

when running the command sudo apt-get install libstdc++ I get the following output on Ubuntu: libstdc++6 is already the newest version. libstdc++6-4.6-dev is already the newest version. libstdc++6-4.6-dev set to manually installed. Some packages…
thomas
  • 167
  • 10
0
votes
1 answer

how to find shared object files of a package which is installed by using sudo apt-get install command

I installed a package in ubuntu 12.04 now I have to set the path to the shared object files of that package in g++ to compile my C++ project. I look at "/usr/local/lib" folder and do not find the so files of newly installed package. Please tell me…
0
votes
1 answer

How can I figure out when I installed a package using apt-get in Debian Linux?

I went to install penguinspuzzle today, and got the following message: penguinspuzzle is already the newest version. How can I figure out when it was installed using apt-get?
paul2520
  • 58
  • 4
0
votes
2 answers

Errors with every package/program installation Ubuntu 12.04

This problem occur after I try to use the script to install Maya 2014 and because I failed with some libraries, I used synaptic package manager to completely remove Maya and I used sudo rm -r /usr/autodesk After that I used Terminal to install…
user1924127