PoiNtEr->: APT Package Manager in Debian

                             Difference between a dream and an aim. A dream requires soundless sleep, whereas an aim requires sleepless efforts.

Search This Blog

Sunday, April 24, 2011

APT Package Manager in Debian


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
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
Download and install the given package name as found in the package database.
sudo apt-get -d install
Download the package only, placing it in /var/cache/apt/archives.
apt-cache show
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
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.

No comments:

Post a Comment