05 October, 2010

apt package manager : options & tricks

APT package manager in Debian systems can be used to download and install packages from online repositories. The APT commands (apt-get, apt-cache, and so on) can be used to install packages locally. However, it’s normally used for working with online software.

sudo apt-get update
Consults /etc/apt/sources.list and updates the database of available packages. Be sure to run this command whenever sources.list is changed.

apt-cache search <keyword>
Case-insensitive search of the package database for the keyword given. The package names and descriptions are returned where that keyword is found.

sudo apt-get install <package>

Download and install the given package name as found in the package database.

sudo apt-get -d install <package>
Download the package only, placing it in /var/cache/apt/archives.

apt-cache show <package>

Display information about the software from the named package.

sudo apt-get upgrade


Check updates for all installed packages and then prompt to download and install them.

sudo apt-get dist-upgrade

Updates the entire system to a new release, even if it means removing packages. (Are you on nuts to do this?)

sudo apt-get autoclean

Can be run anytime to delete partially downloaded packages, or packages no longer installed.

sudo apt-get clean


Removes all cached packages from /var/cache/apt/archives to free up disk space.

sudo apt-get --purge remove <package>

Remove the named package and all its configuration files. Remove the --purge keyword to keep config files.

sudo apt-get -f install

Do a sanity check for broken packages. This tries to fix any “unmet dependency” messages.

apt-config -V


Print version information of installed APT utilities.

sudo apt-key list


List gpg keys that APT knows about. 

apt-cache stats 

Print statistics on all packages installed.

apt-cache depends


Print dependencies for a package (whether it’s installed or not). 

apt-cache pkgnames 

List all packages installed on the system.

0 comments:

Post a Comment

speak out... itz your time !!!

 

Terminal Diary | techblog Copyright © 2009 Gadget Blog is Designed by jintu jacob Powered by Blogger