LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 09-14-2005, 02:02 PM   #1
freddie_leaf
Member
 
Registered: Oct 2004
Distribution: Debian 3.1
Posts: 33

Rep: Reputation: 15
apt-get vs. aptitude


I'm running Sarge v3.1

Being new to Debian I'm doing alot of reading. I'm finding seemingly conflicting infomation, but I think it is related to the different releases (potatoe, woody, sarge..).

Some docs say to use 'apt-get', some say to use 'aptitide'.

Is it correct that if I'm using Sarge I should be using aptitude and not apt-get? aptitude seems to be more comprehnsive with regards to package install and cleanup after deleting a package. What are the other differences?
 
Old 09-14-2005, 02:27 PM   #2
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 48
aptitude is a curses (terminal-based) front-end for apt. It allows you to interactively pick packages in an interactive interface rather than specifying it in a command on the command line (like with apt-get). If you want a similar front-end but with GUI, you can use synaptic.
 
Old 09-14-2005, 02:38 PM   #3
aysiu
Senior Member
 
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,776

Rep: Reputation: 66
Here are some images, so you can see the difference (they all perform the same function):

Synaptic Package Manager
Aptitude
apt-get
 
Old 09-14-2005, 03:16 PM   #4
McCloud
Member
 
Registered: Sep 2004
Distribution: Debian Etch
Posts: 179

Rep: Reputation: 30
You can also run aptitude from the command line. For example
aptitude update
aptitude upgrade
aptitude dist-upgrade

Aptitude is said to deal with dependencies better than apt-get. For example, say you install a package which automatically installs some library packages because it depends on them. When you remove this package with apt-get, it won't remove the libraries this package installed, although they aren't used anymore.

When you install that package with aptitude and remove it with aptitude, aptitude 'detects' that those library packages aren't used anymore and will therefore automatically remove thm.

I myself switched from apt-get to aptitude.
 
Old 09-14-2005, 04:25 PM   #5
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
One nice feature in aptitude: it keeps a log of its actions in /var/log/aptitude . Apt-get doesn't keep any log, I don't know about synaptic.
 
Old 09-14-2005, 05:10 PM   #6
ironwalker
Member
 
Registered: Feb 2003
Location: Jersey shore,north
Distribution: Siduction the only way to do Debian Sid!
Posts: 500

Rep: Reputation: 30
Quote:
Originally posted by McCloud
You can also run aptitude from the command line. For example
aptitude update
aptitude upgrade
aptitude dist-upgrade

Aptitude is said to deal with dependencies better than apt-get. For example, say you install a package which automatically installs some library packages because it depends on them. When you remove this package with apt-get, it won't remove the libraries this package installed, although they aren't used anymore.

When you install that package with aptitude and remove it with aptitude, aptitude 'detects' that those library packages aren't used anymore and will therefore automatically remove thm.

I myself switched from apt-get to aptitude.
True indeed.I also only use aptitude.


Usage: aptitude [-S fname] [-u|-i]
aptitude [options] <action> ...
Actions (if none is specified, aptitude will enter interactive mode):

install - Install/upgrade packages
remove - Remove packages
purge - Remove packages and their configuration files
hold - Place packages on hold
unhold - Cancel a hold command for a package
markauto - Mark packages as having been automatically installed
unmarkauto - Mark packages as having been manually installed
forbid-version - Forbid aptitude from upgrading to a specific package version.
update - Download lists of new/upgradable packages
upgrade - Perform a safe upgrade
dist-upgrade - Perform an upgrade, possibly installing and removing packages
forget-new - Forget what packages are "new"
search - Search for a package by name and/or expression
show - Display detailed information about a package
clean - Erase downloaded package files
autoclean - Erase old downloaded package files
changelog - View a package's changelog
download - Download the .deb file for a package

Options:
-h This help text
-s Simulate actions, but do not actually perform them.
-d Only download packages, do not install or remove anything.
-P Always prompt for confirmation or actions
-y Assume that the answer to simple yes/no questions is 'yes'
-F format Specify a format for displaying search results; see the manual
-O order Specify how search results should be sorted; see the manual
-w width Specify the display width for formatting search results
-f Aggressively try to fix broken packages.
-V Show which versions of packages are to be installed.
-D Show the dependencies of automatically changed packages.
-Z Show the change in installed size of each package.
-v Display extra information. (may be supplied multiple times)
-t [release] Set the release from which packages should be installed
-o key=val Directly set the configuration option named 'key'
--with(out)-recommends Specify whether or not to treat recommends as
strong dependencies
-S fname: Read the aptitude extended status info from fname.
-u : Download new package lists on startup.
-i : Perform an install run on startup.

Also what I like is you can have multiple links in your repository for each section.Aptitude will scan through all the available links and retrieve whatever is available for update.
It just handles pakages better than apt-get.I never use the ncurses version but only via command line.I used ncurses once to set some preferences but thats it.I turn off "remove unused pakages" all the time,I dont like when it does this.
Another note,make sure if you use aptitude you stick with aptitude.Useing another manager to remove a pakage will just make aptitude install it automatically next time.

If you want to browse pakages just use kpakage since it comes with kde(if you use kde) then install with aptitude.Or browse via apt-cache search

Last edited by ironwalker; 09-14-2005 at 05:12 PM.
 
Old 09-14-2005, 08:17 PM   #7
freddie_leaf
Member
 
Registered: Oct 2004
Distribution: Debian 3.1
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks everyone. This makes is great info.
 
Old 09-14-2005, 09:01 PM   #8
Xian
Member
 
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 918

Rep: Reputation: 31
Quote:
Originally posted by Dead Parrot
Apt-get doesn't keep any log, I don't know about synaptic.
A log of system package changes is kept in /var/log/dpkg. It is not provided by apt, but when apt installs, configures, removes, etc. any package it is recorded in that log in Debian.
 
Old 09-14-2005, 09:20 PM   #9
Tons of Fun
Member
 
Registered: Dec 2004
Location: Orlando, Florida
Distribution: Debian Squeeze / BackTrack 5/ Linux Mint 11
Posts: 359

Rep: Reputation: 32
All three packages do the same bottom line, just in different ways with different options. I don't think one is better than the other, it is all personal preference. I have used apt from the beginning, and I love it. It is the most archaic, and doesn't automatically load dependencies like aptitude or synaptic, but it does list the dependencies which you can manually install if you wish. I have grown quite fond of apt, and studied the apt how-to constantly for the first month I was running Debian.

No matter which package manager you wish to use, just keep one thing in mind, do not switch back and forth. The three P.M.'s do not keep track of each other; so if you use apt for the first 6 months, and then try aptitude, it will try uninstalling all of the packages you have installed over the previous 6 months. Many a poor soul has made the mistake thinking that aptitude knew what it was doing.

Like I said, apt doesn't have all of the features that the other two have, but you do have the same capabilities. Apt will remove most dependencies if you remove with --purge. To keep dependencies clean, you have debfoster, deborphan, and autoclean. And to keep buggy packages from getting installed, you have apt-listbugs, and like Xian said, a system log is kept at /var/log/dpkg. The bottom line is to find one that works for you and have fun with it.

 
1 members found this post helpful.
Old 09-14-2005, 09:28 PM   #10
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Quote:
Posted by Xian
A log of system package changes is kept in /var/log/dpkg. It is not provided by apt, but when apt installs, configures, removes, etc. any package it is recorded in that log in Debian.
Thanks, I hadn't noticed that. Still, I prefer to read the aptitude log if I need to recall what packages I installed/upgraded/removed a week ago.
 
Old 09-14-2005, 09:44 PM   #11
Xian
Member
 
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 918

Rep: Reputation: 31
If you want to use Apt and install suggested/reccomended packages, as well as remove orphaned files then you can use the wajig tool.

Code:
$ apt-get install wajig
$ wajig installrs <pkg>       #install sug/req'd pkgs
$ wajig list-orphans        #List libs not req'd by any pkg
$ wajig purge-depend <pkg>      #Purge pkg & deps not required by others
$ wajig purge-orphans      #Purge orphaned libraries

Last edited by Xian; 09-14-2005 at 09:48 PM.
 
Old 09-14-2005, 10:00 PM   #12
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Or, if you want to configure aptitude to install both recommended & suggested packages, or to not install them, see my post in this thread:

http://www.linuxquestions.org/questi...hreadid=363282
 
Old 09-14-2005, 10:10 PM   #13
Xian
Member
 
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 918

Rep: Reputation: 31
You can also set-up Synaptic to show orphaned packages which can be selected for removal. Here's the quick how-to:

From the main toolbar in Synaptic goto
Settings > Filters
Click 'New'
Name the filter in the top dialogue box.
The name 'Orphaned' is good choice.

Click 'Delselect All'
Tick 'Orphaned'
Click 'Okay'

Now from the main window:
Click 'Custom' and highlight 'Orphaned'

There will be listed all your orphaned packages.
Review for any that should not be removed.

Purge or remove any others you desire.
 
Old 09-14-2005, 10:39 PM   #14
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
If you use the "interactive" UI of aptitude (by just typing "aptitude"), you can highlight a package and then press Shift + c and this will fetch the changelog for that package and show it in your default pager. I use this feature quite often to decide if I want to upgrade a package or not. I don't know if other frontends for apt have this feature.
 
Old 09-14-2005, 10:55 PM   #15
aysiu
Senior Member
 
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,776

Rep: Reputation: 66
Synaptic has this feature:

Package > Download Changelog

Last edited by aysiu; 09-14-2005 at 11:01 PM.
 
  


Reply

Tags
apt, apt-get, aptitude, debian, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
is apt-get buggy or is aptitude lying!? Daveb3 Debian 14 07-26-2005 03:55 PM
aptitude Metallic Debian 6 04-14-2005 04:47 PM
general aptitude BorisMcHack Debian 1 01-04-2005 03:03 PM
Aptitude *better alternative* to Apt-Get? Triple5 Debian 6 12-05-2004 02:24 PM
Debian aptitude - apt-get problem mikek147 Linux - Distributions 1 09-15-2002 07:11 AM


All times are GMT -5. The time now is 08:12 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration