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

Getting 'command not found' when running apt-get in unix

I am trying to instal daemon on Unix via the apt-get command. When I run the command apt-get install daemon I get apt-get: command not found Does anyone have nay ideas about how to fix this.
Ben Pearce
  • 6,884
  • 18
  • 70
  • 127
0
votes
1 answer

"debian apt-get install" to install newer version of a certain package other than the default one 5 years old

How to use "debian apt-get install" to download the newest available version of a certain package other than one years old but without changing system-wide settings/sources.list? for example "apt-get install gddrescue" will get the version of 2009…
user1022584
0
votes
2 answers

How do I know what packages are named with apt-get?

Linux noob here. I want to download a program. Lets say this time its an ssh server. How do I know what to type in sudo apt-get ???? install? I tried ssh and sshserver just off the top of my head, but they didn't work. Is there a search function or…
Magicaxis
  • 371
  • 7
  • 16
0
votes
1 answer

apt-cyg, where the downloaded files stored?

When I use the command 'apt-cyg install package-name' and once the Cygwin has downloaded the package it says 'package-name saved'. I can't seem to find this in the hard drive though. So where is it located?
samsamara
  • 4,630
  • 7
  • 36
  • 66
0
votes
1 answer

Automate installation using bash script - how to answer dialogs written with ncurses

How to automatically answer dialogs (written with ncurses) during installation in Ubuntu? For example during postfix installation.
zvoice
  • 183
  • 3
  • 9
0
votes
1 answer

How to make apt-get install prefer source from local iso?

If there are lots of sources in sourcelist, but I want apt-get to prefer source from local iso, rather than remote mirror, even when remote package is newer than local iso, I want apt-get to choose local iso, what I should do in order to make it…
hugemeow
  • 7,777
  • 13
  • 50
  • 63
0
votes
1 answer

Why is apt-get install libsqlite3-dev giving me a 404 error?

I'm trying to install a sqlite3 gem using bundler and am getting the common Failed to build native gem extensions error. I'm trying to install the necessary files to fix this and successfully installed ruby-dev using apt-get install, but when I run…
-1
votes
0 answers

How to solve the following signature errors that I got when tried `sudo ap-get update`?

The command that I entered and the response for that command are shown below. In the code below I masked the username of the computer and the public key. `***@***:~$ sudo apt-get update Hit:1 http://packages.microsoft.com/repos/code stable InRelease…
Jeeva M
  • 9
  • 2
-1
votes
0 answers

Package ca-certificates is not available, but is referred to by another package

I try to run this command sudo apt-get install ca-certificates on Ubuntu 22.04, but i get this output. Reading package lists... Done Building dependency tree... Done Reading state information... Done Package ca-certificates is not available, but is…
-1
votes
1 answer

signature issue while installing influxdb2 on ubuntu20.04

I am trying to install influxdb2 with the link install influxdb2 on ubuntu 20.04 but got signature related issue as below. Any help to resolve this would be appreciated. /home/ravi>sudo su /home/ravi#wget -qO-…
-1
votes
1 answer

Unable to locate package apt-get when building a custom Google Cloud Workstation image

I am trying to "build and push a modified workstations image to a container registry" as explained in this previous SO answer. This is the Dockerfile that I am trying to use: FROM…
-1
votes
1 answer

apt-get install from Dockerfile returns non zero code 100

I have a Dockerfile in which I want to install ffmpeg on my machine. However, the Dockerfile always ends with the following error: Sending build context to Docker daemon 3.371GB Step 1/22 : FROM nvcr.io/nvidia/deepstream:6.0.1-devel --->…
jfst
  • 1
  • 3
-1
votes
1 answer

apt show filter by multiple fields

I want to get all binary packages that belong to specific source package from specific Debian source/repository. apt show bla-dev command returns output like this: Package: bla-dev Version: 1.3-2 Priority: extra Section: libdevel Source:…
-1
votes
1 answer

unable to install latest certbot on Linux

Below is my Linux version root@DKERP:~# uname -a Linux DKERP 5.4.0-96-generic #109-Ubuntu SMP Wed Jan 12 16:49:16 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux I tried the below commands as root user inorder to install the latest certbot. 246 sudo…
Ashar
  • 2,942
  • 10
  • 58
  • 122
-1
votes
1 answer

Error while update the linux (sudo apt-get update)

W: GPG error: https://apt.kitware.com/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6AF7F09730B3F0A4 E: The repository 'https://apt.kitware.com/ubuntu xenial InRelease' is…