APT (Advance Packaging Tool) is a wonderful package management system. It consists of different tools, which names usually begins with "apt-" : apt-get, apt-cache, apt-cdrom, etc. Unlike RPM, which equivalent in a Debian system would probably be DPKG, apt-get handles dependencies resolution and takes care of downloading the software for you (much like YUM in a Red Hat system).
Aptitude is a terminal-based apt frontend with a number of useful features, including: a mutt-like syntax for matching packages in a flexible manner, dselect-like persistence of user actions, the ability to retrieve and display the Debian changelog of most packages, and a command-line mode similar to that of apt-get. One should use aptitude to install meta-packages because aptitude keeps log of all packages that are part of meta-package. Its easy to remove/un-install meta-package if one go with aptitude.
One must have root privileges to execute apt-get or aptitude commands. Execute 'su' or add prefix 'sudo' to gain root privileges.
Installating a binary package is done in one single step :
Code:
apt-get install package //Exact package name will be required
Uninstalling a package is done like this :
Code:
apt-get remove package
Or if you wish to remove the package along with all of its configuration files (essentially doing a clean uninstall):
Code:
apt-get remove --purge package
Note: A word of caution : apt-get handles dependencies in a very strict manner. If you try to uninstall a piece of software that other pieces of software depends on, apt-get will also want to uninstall them (not before warning you about the situation).
There are many other features of apt command, it comes with a built in tool package for building, compiling e.t.c.Just have a look. Once the user has a sources.list adapted to his/her needs, the local list of packages needs to be updated :
Code:
apt-get update
Only then can the repositories be browsed with apt-cache.
To search a package from its text description :
Code:
apt-cache search something
To know more about a package and its description (dependencies, functionnalities, maintainer's identity, etc.) :
Code:
apt-cache show package
Another neat feature of apt-get : it allows to build and install a source package. Minimally, two steps are needed in order to do that. First install the package dependencies :
Code:
apt-get build-dep package
Secondly tell apt-get to build and install the package itself :
Code:
apt-get source -b package
Aptitude is a terminal-based apt frontend with a number of useful features, including: a mutt-like syntax for matching packages in a flexible manner, dselect-like persistence of user actions, the ability to retrieve and display the Debian changelog of most packages, and a command-line mode similar to that of apt-get. One should use aptitude to install meta-packages because aptitude keeps log of all packages that are part of meta-package. Its easy to remove/un-install meta-package if one go with aptitude.
One must have root privileges to execute apt-get or aptitude commands. Execute 'su' or add prefix 'sudo' to gain root privileges.
Installating a binary package is done in one single step :
Code:
apt-get install package
Uninstalling a package is done like this :
Code:
apt-get remove package
Or if you wish to remove the package along with all of its configuration files (essentially doing a clean uninstall):
Code:
apt-get remove --purge package
Note: A word of caution : apt-get handles dependencies in a very strict manner. If you try to uninstall a piece of software that other pieces of software depends on, apt-get will also want to uninstall them (not before warning you about the situation).
There are many other features of apt command, it comes with a built in tool package for building, compiling e.t.c.Just have a look. Once the user has a sources.list adapted to his/her needs, the local list of packages needs to be updated :
Code:
apt-get update
Only then can the repositories be browsed with apt-cache.
To search a package from its text description :
Code:
apt-cache search
To know more about a package and its description (dependencies, functionnalities, maintainer's identity, etc.) :
Code:
apt-cache show
Another neat feature of apt-get : it allows to build and install a source package. Minimally, two steps are needed in order to do that. First install the package dependencies :
Code:
apt-get build-dep
Secondly tell apt-get to build and install the package itself :
Code:
apt-get source -b package
No comments:
Post a Comment