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

docker tutorial how to install package

I'm just following the getting started of docker and I'm a bit lost. I've create a mydockerbuild folder in my document and a dockerfile with this code (from the tutorial) FROM docker/whalesay:latest RUN apt-get -y update && apt-get install -y…
BoumTAC
  • 3,531
  • 6
  • 32
  • 44
0
votes
1 answer

Raspberry pi: Inconsistency detected, assertion failed

I get the below error when I do: sudo apt-get upgrade Please help: Extracting templates from packages: 100% Preconfiguring packages ... Inconsistency detected by ld.so: dynamic-link.h: 190: elf_get_dynamic_info: Assertion `info[20]->d_un.d_val == 17…
Romaan
  • 2,645
  • 5
  • 32
  • 63
0
votes
1 answer

the differences of install software in linux

For me, I know three ways to install software in ubuntu. First is "apt-get install", next is "dpkg", the last is "./configure, sudo make ,sudo make install". But could anyone tell me the differences of these three ways?
DavidHsu
  • 3
  • 2
0
votes
1 answer

apt-get package in virtualenv

Hi i am trying to install python imaging library in a virtual environment in linuxmint 17.1. I tried this link. Decoder JPEG not available error when following Django photo app tutorial I also posted this question but no answer till…
Manish Gupta
  • 4,438
  • 18
  • 57
  • 104
0
votes
2 answers

unable to find source package for llvm-3.3

i am getting the following error while running sudo apt-get build-dep llvm-3.3 unable to find source package for llvm-3.3 I am using Ubuntu 11.10 (i am using this old version for a special purpose) i am trying to build a particular software and…
zappy
  • 1,864
  • 3
  • 18
  • 36
0
votes
2 answers

Apt-get install bluez and bluetooth for debian noninteractively

I'm trying to build an image of a debian and install certain applications, all non-interactively. Almost everything works, but alas, almost ... I chroot into my working directory and try to install bluez and bluetooth: apt-get install -y…
Kousha
  • 32,871
  • 51
  • 172
  • 296
0
votes
2 answers

how to remove a ubuntu package from manual install list without actually remove it?

whenever you install a package in ubuntu, it is added to manual install and the system will make sure it is updated and configured correctly. but i cannot find a way to remove the packages from the manual install list. i want to do this so i let the…
David S.
  • 10,578
  • 12
  • 62
  • 104
0
votes
2 answers

Bug Python 2.7.7 VS 2.7.9 on Debian Wheezy

I wanted to install Python 2.7.9 on my Debian Wheezy and I've download the .deb file from Debian site. Unfortunately now I apparently have caused a bug, this is what I have after an apt-get upgrade: Reading package lists... Done Building dependency…
Francesco Mantovani
  • 10,216
  • 13
  • 73
  • 113
0
votes
1 answer

OpenStack instances do not update

I have a critical situation. I installed openstack in multinode servers (controller, network, compute1, compute2). Everything works fine except when it comes to update instances using apt-get update. I am getting this error: 98% [Waiting for…
0
votes
1 answer

How to upgrade ubuntu packages on VPS with a working website?

So I have a VPS that my site runs on and I want to upgrade the ubuntu packages because it says there are some that have security holes, so I wonder if I just should turn my site off, ssh to the vps, use apt-get update and apt-get upgrade, restart it…
NoDisplayName
  • 15,246
  • 12
  • 62
  • 98
0
votes
3 answers

Installing Ruby on Linux

I want to install only Ruby, not Ruby on Rails, I check this command: sudo apt-get install ruby-full -g But the terminal report me this error: E:Command line option 'g' [from -g] is not known This command will install the latest stable Ruby…
Antonio Morales
  • 1,044
  • 2
  • 16
  • 35
0
votes
3 answers

download latest firefox version script

How Could I download the latest version of firefox via the command line and insert into a script I have tried wget https://download.mozilla.org/?product=firefox-38.0.1-SSL&os=linux64&lang=en-US I copied the link location from the download button at…
phillipsK
  • 1,466
  • 5
  • 29
  • 43
0
votes
1 answer

apt- get command error while installing nodejs

i tried to install nodejs using apt-get install but i am getting the following errors Setting up spamassassin (3.4.0-6) ... error: gpg required but not found! It is not recommended, but you can use "sa-update" with the --no-gpg to skip the…
0
votes
3 answers

How to install a package in user defined directory using apt-get?

I'm using ubuntu, whenever I install any package it gets installed in standard directories /usr/lib /usr/local/lib etc. I want to install a package in a non standard directory. Is there any way to do this?
nitin kumar
  • 642
  • 12
  • 21
0
votes
1 answer

How to repair Java in Ubuntu after trying to switch to Java 6 using update-java-alternatives

I tried to switch from Java 5 to Java 6 using the "update-java-alternatives" command like explained on this page: https://help.ubuntu.com/community/Java But afterwards I get the following error when I tried to execute java: root@webserver:~#…
2ndkauboy
  • 9,302
  • 3
  • 31
  • 65