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

check for installed application using bash file if then in Ubuntu

I am writing a bash file to install applications using apt-get in Ubuntu but I don't know how to do a check if the applications are installed. The pseudo code I'm thinking of is something like this: string app_list = {list of applications} for i in…
Alex
  • 119
  • 6
-3
votes
1 answer

Linux: How do I headlessly install an old version of VLC?

I need to install an old version of VLC from the command line (can't use a browser to download anything). I know it sounds weird, but the specific version of VLC doesn't matter as long as it isn't the most up to date. EDIT Based on the suggestion…
-3
votes
1 answer

Linux: Console apt-get not available?

I need to install Java, Solr, and update Git on this dedicated server. I have ssh root access and was going to use the apt-get method to install what I need. But says this command is not found. Is this not a core Linux thing? I am guess I need to…
Josh
  • 3,673
  • 3
  • 20
  • 27
-3
votes
1 answer

Use os.system to install a program on apt-get?

Is it possible to use os.system to install a program on apt-get. Here's what I've tried so far: if comm == "install": os.system("gnome-terminal -e sudo apt-get install"+args) (args being the argument supplied to the command)
Lambda
  • 3
  • 2
-3
votes
1 answer

install mysql (shell) without mysqld (server)

I only need to install the mysql command line shell utility, and don't want to install the whole server software (mysqld). This is for space constraints, mainly, and I also don't wanto to have on my front end machine stuff that doesn't belong there.…
tompave
  • 11,952
  • 7
  • 37
  • 63
1 2 3
70
71