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

Why can't I use apt-get on Mac even though wget is installed

I use Mac Big Sur 11.5.1. I installed wget using brew, but the terminal said apt-get: command not found when I put sudo apt-get install ros-noetic-imu-tools. Although I tried brew install wget again, it said wget 1.21.1 is already installed and…
Lala
  • 11
  • 1
  • 2
-1
votes
1 answer

Linux Dependency Errors (can't install Stella)

I'm trying to install the Stella Atari Emulator on Ubuntu 20.04 for a course that I'm taking. I get the following error: sudo dpkg -i stella_6.5.3_amd64.deb Selecting previously unselected package stella. (Reading database ... 202707 files and…
Sean Payne
  • 1,625
  • 1
  • 8
  • 20
-1
votes
1 answer

After apt install the package is executable but can't remove it

After successfully installing the dvips package, it shows up: Step 1) root@CCNM-378B:~# dvips -v This is dvips(k) 5.997 Copyright 2017 Radical Eye Software (www.radicaleye.com) But now I'm trying to remove it, and it is invisible to apt: Step…
Ron
  • 357
  • 1
  • 6
  • 18
-1
votes
1 answer

Can't find curl or sudo package in a ubuntu pod

I deployed a service on kubernetes and then I wanted to test it out inside the cluster itself, before I put an ingress rule to access it outside. So, after I verified from the log that the service is running. I tried to create a pod and get to the…
The 0bserver
  • 826
  • 9
  • 18
-1
votes
3 answers

How to uninstall any software from ubuntu 20.04 LTS using Terminal?

I install intelliJ Idea community in my ubuntu 20.04 system. And by mistake i disabled the android option.. so i wanted to reinstall it. So i type "sudo apt-get remove " But it always shown E: unable to locate the package And It is not only for…
Aishwarya Roy
  • 19
  • 1
  • 4
-1
votes
1 answer

apt-get installation prblem

when i install any package in kali linux 2019.2 it happens some error.. root@kali:~# apt-get install vlc Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to…
-1
votes
1 answer

Trying to download and install with apt-get with specified directory

I am trying to do sudo apt-get --download-only ??target_directory?? but i want to specify the download location so that, in future i want to install my pre-downloaded package without internet connection with sudo apt-get --no-download…
-1
votes
1 answer

apt-get always installs old version of node.js

I want to install 11.x version of Node.js on my Ubuntu sevrer using apt/apt-get, but it always installs version 8.10.x. Is there a way to install the latest 12.x or 11.x version without using nvm? I've tried apt-get update, purging nodejs, using…
alexozornin
  • 33
  • 1
  • 4
-1
votes
1 answer

How to install apt-get package in Amazon Linux machine

How to install apt-get in amazon linux machine,using yum or wget ,i searched extensively but didnt find relvant ..getting below message [ec2-user@ip-172-31-33-94 ~]$ sudo apt-get update -y && sudo apt-get install -y linux-image-extra-$(uname…
Margaret real
  • 329
  • 1
  • 6
  • 14
-1
votes
1 answer

Install package managers over SSH & FTP

i have an device running on Pure Linux, there is no Package installer installed on that, the only thing i have is SSH and therefore also an Terminal. Commands like apt-get, dpkg, yum dont work. How do i install apt-get over SSH? I've saw some…
Marc Ma
  • 318
  • 2
  • 12
-1
votes
1 answer

why customize the sources.list with my own deb always failed to locate the deb for Ubuntu

here is my issue background, I need to install postgresql and mongodb on one off-line server, so I copied the deb file from one server which already installed postgresql and mongodb properly, but at last step when I try sudo apt-get install on…
Qiang Wang
  • 61
  • 1
  • 3
-1
votes
1 answer

Curl installation Ubuntu PHP 7 failing - package not found

Trying to install php-curl at ubuntu keeps failing. I have PHP7 at: Distributor ID: Ubuntu Description: Ubuntu 16.10 Release: 16.10 Codename: yakkety Tried running sudo apt-get install php7.0-curl And sudo apt-get install…
Guilherme Ferreira
  • 2,209
  • 21
  • 23
-1
votes
1 answer

i installed ubuntu for chromeos but it did not come with apt-get.

i installed ubuntu for chromeos but it did not come with apt-get. I am using chromeos. Uname -a output is armv71. I installed ubuntu 14.04.
-1
votes
1 answer

fann_create_from_file() undefined function on Ubuntu 16

I installed php fann (https://github.com/bukka/php-fann) in a Ubuntu 16 Server, here is the console output: sudo apt-get install libfann-* Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting…
Arivan Bastos
  • 1,876
  • 1
  • 20
  • 28
-1
votes
2 answers

linode | ubuntu | sudo apt-get update | mirror 404 error

On Linode (Ubuntu 16.10), after enabling UFW firewall via sudo ufw allow OpenSSH sudo ufw enable sudo ufw allow in "Apache Full" (though I'm not completely sure the firewall setup is the source of my issues...) sudo apt-get update is giving me the…
JED
  • 1,538
  • 2
  • 19
  • 47