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 install package for libmapscript-ruby1.8 not behaving as anticipated

TL;DR: How can I get the right package for libmapscript-ruby1.8 on my system? Context: We have found an open source Rails 2.3 app that solves an internal tool problem. https://github.com/timwaters/mapwarper Additional…
0
votes
1 answer

Unable to install packages using Docker on Mac

This morning I've started playing with Docker, so installed boot2docker on my Mac. All seemed to be going well, following the Working with Docker Images documentation until I tried to create a Dockerfile to install the ruby gems. I spent a long time…
TobyG
  • 1,692
  • 3
  • 21
  • 36
0
votes
1 answer

Linux Mint update GPG error

I search a lot about this problem, but all the solutions I found did not solve my problem. I installed Linux Mint 17 with mate desktop in a virtual machine. After the installation, I wanted to update the packages but after running apt-get update I…
alex
  • 84
  • 7
0
votes
1 answer

How can I install the BSD Game fish?

I heard of the package bsdgames. It should contains fish. But when I typed fish I was able to install a new shell called fish. So how can I install fish from the bsdgames package on a Ubuntu machine?
user3711869
  • 51
  • 1
  • 2
  • 3
0
votes
2 answers

How to see the original Debian md5sum of an installed file?

Here's the situation. A Debian package has already been installed. A file from that Debian package appears to have been altered. However, I am unable to find the original md5sum of the file when the file was installed. The original package is no…
user2569618
  • 517
  • 3
  • 16
  • 42
0
votes
2 answers

How to find non official installed packaged?

How do I find all installed packages that are not from the official Ubuntu repository? Some of the packages might have been installed with dpkg -i ....
Jasmine Lognnes
  • 6,597
  • 9
  • 38
  • 58
0
votes
2 answers

apt-get update not working

I'm having problems updating apt. When run apt-get update Ign http://dl.google.com stable InRelease Hit http://ftp.bg.debian.org testing InRelease Hit http://dl.google.com stable Release.gpg Hit http://dl.google.com stable Release …
selfbg
  • 317
  • 1
  • 4
  • 14
0
votes
0 answers

Apt-get is going mental when trying to install C++

I tried to use 'apt-get install c++' to install C++ onto my Ubuntu 14.04 machine but it just seems to go crazy and it also does this when I try to install any other package also. I captured the output of the command,…
TechnoCF
  • 178
  • 1
  • 8
0
votes
1 answer

Installing openjdk7-jre on debian squeeze server

I am trying to update a server to use openjdk-7-jre using apt-get install openjdk-7-jre This returns this. Reading package lists... Done Building dependency tree Reading state information... Done Package openjdk-7-jre is not available,…
0
votes
2 answers

apt-get fails with following error linux-headers-3.2.0-58-generic' contains empty filename

Preconfiguring packages ... Selecting previously unselected package libc-ares2. (Reading database ... 85%dpkg: unrecoverable fatal error, aborting: files list file for package `linux-headers-3.2.0-58-generic' contains empty filename E:…
cubeloid
  • 149
  • 1
  • 6
0
votes
0 answers

broken packages when install python-apt package

I want to install python-apt package in a debian(squeeze) server : root@server:# apt-get install python-apt but I get the following error: Reading package lists... Done Building dependency tree Reading state information... Done Some packages…
mojibuntu
  • 307
  • 3
  • 16
0
votes
1 answer

Is there's a tool for managing source.list?

Is there's any tool for managing /etc/apt/source.list? I've had already couple of variants when I need it so bad, for example when using fabric or chef or when using veewee for building boxes of Vagrant. Every time using sed, and putting my own…
holms
  • 9,112
  • 14
  • 65
  • 95
0
votes
2 answers

How to uninstall apt-get on OSX?

Is apt-get part of the OSX? If not, what would be the easiest way to uninstall it from the system?
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
0
votes
2 answers

Unable to install Java 6 and install 7

I am trying to install Java 7. I tested my Java version first, please see the below code ubuadmin@ubuserver3:~/JavaJars/HelloWordGPU$ java -version java version "1.6.0_30" OpenJDK Runtime Environment (IcedTea6 1.13.1)…
PeakGen
  • 21,894
  • 86
  • 261
  • 463
0
votes
1 answer

Have apt-get install packages from a specific location

I have a bunch of .deb packages that I would like to install. I want to keep them within a specific folder so that I can easily access them. There are about 200 packages in total that all depend on each other. So, can I use apt-get to install this…
user244985
  • 121
  • 3
  • 10