Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Debian GNU/Linux FAQ
Prev Home Next

7.1.2 APT

APT is the Advanced Package Tool and provides the apt-get program. apt-get provides a simple way to retrieve and install packages from multiple sources using the command line. Unlike dpkg, apt-get does not understand .deb files, it works with the packages proper name and can only install .deb archives from a source specified in /etc/apt/sources.list. apt-get will call dpkg directly after downloading the .deb archives[4] from the configured sources.

Some common ways to use apt-get are:

  • To update the list of package known by your system, you can run:
         apt-get update
    

    (you should execute this regularly to update your package lists)

  • To upgrade all the packages on your system, run:
         apt-get upgrade
    
  • To install the foo package and all its dependencies, run:
         apt-get install foo
    
  • To remove the foo package from your system, run:
         apt-get remove foo
    
  • To remove the foo package and its configuration files from your system, run:
         apt-get --purge remove foo
    
  • To upgrade all the packages on your system to a new Debian GNU/Linux release, run:
         apt-get dist-upgrade
    

Note that you must be logged in as root to perform any commands that modify the system packages.

The apt tool suite also includes the apt-cache tool to query the package lists. You can use it to find packages providing specific functionality through simple text or regular expression queries and through queries of dependencies in the package management system. Some common ways to use apt-cache are:

  • To find packages whose description contain word:
         apt-cache search word
    
  • To print the detailed information of a package:
         apt-cache show package
    
  • To print the packages a given package depends on:
         apt-cache depends package
    
  • To print detailed information of the versions available for a package and the packages that reverse-depends on it:
         apt-cache showpkg package
    

For more information, install the apt package and read apt-get(8), sources.list(5) and install the apt-doc package and read /usr/share/doc/apt-doc/guide.html/index.html.


Debian GNU/Linux FAQ
Prev Home Next

 
 
  Published under the terms of the GNU General Public License Design by Interspire