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

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 Reference Guide
Prev Home Next

6.2.6 aptitude, apt-get and apt-cache commands

While tracking testing as described in the above example you can manage the system by using the following commands:

  • aptitude upgrade (or apt-get upgrade or aptitude dist-upgrade or apt-get dist-upgrade)

    These track the testing distribution — they upgrade each package on the system, after installing versions of packages upon which it Depends, from the testing distribution. [35]

  • apt-get dselect-upgrade

    This tracks the testing distribution — it upgrades each package on the system according to the selections of dselect.

  • aptitude install package/unstable

    This installs package from the unstable distribution while installing its dependencies from the testing distribution.

  • aptitude install -t unstable package

    This installs package from the unstable distribution while installing its dependencies also from the unstable distribution by setting the Pin-Priority of unstable to 990.

  • apt-cache policy foo bar ...

    This checks the status of packages foo bar ....

  • aptitude show foo bar ... | less (or apt-cache show foo bar ... | less)

    This checks the information for packages foo bar ....

  • aptitude install foo=2.2.4-1

    This installs the particular version 2.2.4-1 of the foo package.

  • aptitude install foo bar-

    This installs the foo package and removes the bar package

  • aptitude remove bar

    This removes the bar package but not its configuration files.

  • aptitude purge bar

    This removes the bar package together with all its configuration files.

In the above examples, giving apt-get the -u option causes it to print a list of all packages that are to be upgraded and to prompt the user before taking action. The following makes apt-get always do this:

     $ cat >> /etc/apt/apt.conf << .
     // Always show packages to be upgraded (-u)
     APT::Get::Show-Upgraded "true";
     .

Use the --no-act option to simulate actions without actually installing, removing, etc., any packages.


Debian GNU/Linux Reference Guide
Prev Home Next

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