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
-1
votes
1 answer

Previous apt-get update & install Docker layer removed during every build

I have a Dockerfile containing the following: FROM ubuntu:17.10 WORKDIR /app ADD . /app RUN apt-get update && apt-get install -y \ python3-pip \ python3-numpy \ ffmpeg \ python3.6 \ xz-utils ... The layer created at the RUN statement is removed…
ehdusjenny
  • 146
  • 2
  • 6
-1
votes
1 answer

Debian install MySQL specific version not available

I got two serveurs. ClientServ and DevServ. The client serveur is on Debian 7 with Mysql 5.5.49-0+deb7u1. My goal is to have the same package in my DevServ. Unfortunaly, I tried to apt-get install I only got "5.5.55-0+deb7u1". I checked the repo…
Joe
  • 83
  • 2
  • 9
-1
votes
1 answer

Can't install using sudo apt-get - package lists... Error

I am trying to install pyqt5 on my computer using the following command sudo apt-get install python3-pyqt5 But I am getting the following error below - Reading package lists... Error! E: Encountered a section with no Package: header E: Problem with…
-1
votes
2 answers

TinyOS 2.1.2 installation failure

I am trying to install TinyOS 2.1.2 in Ubuntu Virtual Machine. During the execution of the following command I am facing the error mentioned. $sudo apt-get install nesc tinyos-tools msp430-46 avr-tinyos Reading package lists... Done Building…
-1
votes
1 answer

Ubuntu apt-get failed to fetch packages

I use ubuntu 14.04. apt-get worked fine until recently. apt-get will return failure message while using apt-get update: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/trusty/Release.gpg Connection failed [IP: 115.28.122.210 80] …
Xia Sheng
  • 39
  • 6
-1
votes
1 answer

sudo: apt-get: command not found linux server

I am using a Linux server andtrying to install the jdk package. But when i try sudo apt , I get the following error: sudo: apt-get: command not found The version of Linux is: 3.10.0-229.el7.x86_64 GNU/Linux Can't figure out whats wrong
Diganta Bharali
  • 243
  • 2
  • 3
  • 9
-1
votes
1 answer

N: Ignoring file 'google.listsudo' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension

I have tried to install google-chrome and it was finished, then I ran sudo apt-get update command and it is showing this error message. How to solved it?
Mr.deva
  • 3
  • 3
  • 7
-1
votes
2 answers

sudo apt-get update failing in ubuntu 12.04

I am trying to update apt-get in order to install salt-minion but I am getting the error GPG error: http://repo.saltstack.com precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY…
-1
votes
2 answers

Cannot install g++ on ubuntu 14.04.4 LTS (I have tried commands and software center)

I cannot install g++ on newly installed ubuntu 14.04.4 LTS. When I use command sudo apt-get install g++, the terminal tell me: cluster@cluster0-vm:~$ sudo apt-get install g++ [sudo] password for cluster: Reading package lists... Done Building…
xysmlx
  • 1
  • 3
-1
votes
1 answer

Uncompleted installation files using apt-get

Often I install softwares/packages using apt-get. If the installation is stopped or interrupted anyhow, then how to find and remove the partially installed files? Besides if I install the same package later, will the apt-get installation process…
Voldemort
  • 1
  • 3
-1
votes
3 answers

importing python packages with python

So I was hoping to write my code more resiliently, starting from the top in python I was thinking of addressing importing. I want code to run on systems where required packages haven't been installed. To achieve this I was hoping to install packages…
kpie
  • 9,588
  • 5
  • 28
  • 50
-1
votes
2 answers

What is the difference between AWS Marketplace and sudo apt-get install?

I'm seeking objective answers, so that this is not closed as subjective. Question may be moved to a different site if required. What is the difference between AWS Marketplace and sudo apt-get install, and how do I decide to choose one over the…
ADTC
  • 8,999
  • 5
  • 68
  • 93
-1
votes
1 answer

apt-get update fail with Hash Sum mismatch in docker

FROM ubuntu:14.04 RUN apt-get update RUN apt-get install -y build-essential git RUN apt-get install -y python python-dev python3 python3-dev python3-pip RUN apt-get install -y nginx uwsgi uwsgi-plugin-python3 supervisor RUN pip3 install…
egaoneko
  • 389
  • 1
  • 5
  • 24
-1
votes
2 answers

HHVM cannot be installed: "packages have unmet dependencies:"

I am in Ubuntu 14.04, 64bit and am trying to install HHVM. I have already installed Nginx. When I run the following commands: sudo apt-get install software-properties-common sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80…
Kerry Ritter
  • 1,127
  • 4
  • 17
  • 27
-1
votes
1 answer

How to configure apt-get in Debian Stable, Could not get lock /var/lib/dpkg/lock

I am using Stable Debian (8.1 - jessie), installed from Live (debian-live-8.1.0-amd64-xfce-desktop.iso)... Now, starting to install all other things, nothing is possible (!)... apt-get and Synaptic not working... with apt-get install apache2: "E:…
Peter Krauss
  • 13,174
  • 24
  • 167
  • 304