I don't get why there are two different programs in a minimal install to install software. Don't they do the same thing? Is there a big difference? I have read everywhere to use aptitude over apt-get but I still don't know the difference
|
feedback
|
|
aptitude is a wrapper for dpkg just like apt-get/apt-cache, but it is a one-stop-shop tool for searching/installing/removing/querying. A few examples that apt might not supply:
| |||||
feedback
|
| |||
|
feedback
|
|
The official tool that is currently used within the Debian installer Aptitude offers a curses interface (when run without any parameter) and a command line interface that can do almost everything that But aptitude is based on the libapt library (it's not a direct wrapper of dpkg) and as such it depends on the
To learn more on how apt/dpkg/aptitude interact you can check the diagram made by Daniel Burrows (aptitude's main author). Another diagram presents the information stored by the various package management tools: A map of the apt and dpkg state files. You can also read my article apt-get, aptitude, … pick the right package manager for you | ||||
|
feedback
|
|
aptitude remebers which packages you deliberately installed and which have been automatically installed to satisfy dependencies. Upon removal of a package aptitude will remove those automatically installed packages to keep your system tidy. apt-get isn't that smart. aptitude will quickly become an indispensable tool once you use different repositories with different versions of a package. Imagine you are working with backports.org or inofficial repositories like debian-multimedia.org. Then aptitude will show (at the bottom of the details page of a certain package) the available version number and allow you to select one. If you get into a situation where programs conflict due to such usage of inofficial repositories you will see a "Broken: ..." display on the top. You can type l~b (limit / flag / broken) and just get a list of packages that conflict with each other. Makes it much easier to resolve the conflict manually. Futhermore you can use "l" to limit the package list. Imagine you are looking for packages that start with "openoffice" then press "l" and type "^openoffice" (it's a regular expression) and you will see just those packages. Choose a "flat package list" from the menu and you will get reach your goal quickly. The complete handbook is very large offering you many more filters and possibilities. Even if you don't know them aptitude is a handy replacement for apt-get and you can use it with common parameters like aptitude install ... (install or upgrade a package) aptitude remove ... (remove the binary portions of a package but preserve your /etc configuration) aptitide purge ... (remove the package completely including your configuration) | |||||
feedback
|
|
as you know when you install a package if it needs other packages (dependencies) they will be downloaded and installed too. aptitude tracks, at the moment of install, the packages that come with the installed one so when you remove the latter aptitude will ask you for the removal of the other (now unused) "orphaned" dependencies. apt-get will keep them in your system silently if you remove the "main" package. it looks like the latest versions of apt-get has a similar functionality: http://www.psychocats.net/ubuntu/aptitude | |||
|
feedback
|
|
The biggest difference is that aptitude is designed to be interactive where the apt tools are better suited for scripting work. You can use the latter, i.e. the apt tools, interactively just fine with a lot more effort to get the same results that aptitude provides. If you had to settle on just one tool or the other for some reason then you need to decide how much effort you want to put into your package management. | |||
|
feedback
|
|
Aside from providing a pretty console UI when you run To search for a package and install it, using apt-get:
..but with aptitude it's the same command:
| |||||
feedback
|
|
One of the serious advantages of aptitude is its ability to calculate dependencies. Firstly it can handle complicated inter-dependencies without intervention by yourself, which often apt-get fails on. But if you don't like the solution it has presented you (and it will score its own solution to demonstrate how good it thinks it is), you can ask it to go away and come up with another solution to resolve the conflict. It really does do some awesome package management. | |||
|
feedback
|
|
The biggest difference is: type "aptitude" without any parameters. It gives you a Text based user interface, you can use keybord to search/navigate etc. see information on dependencies, reverse dependencies, all available versions of a package, and you can do any package manager operation on them from that screen. You can press "g" to review the changes, modify the package additions and removals if necessary, and apply all pending operations. A great visual way of package management over an ssh connection or plain old terminal. | |||
|
feedback
|