Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old May 28th, 2005   #1
tread
Extra Foam Sugar Free Ubuntu
 
Join Date: Apr 2005
Beans: 737
HOWTO: use aptitude instead of synaptic and why.

HOWTO: use aptitude instead of synaptic

What is aptitude?
Aptitude is a package manager for Debian and Debian based systems (similar to say, synaptic).

Why should you use aptitude over synaptic/apt-get?
The million dollar reason: it remembers dependencies downloaded to install a particular package and removes them automatically when you remove that package. Synaptic only gives you the history log, and apt-get not even that.
For example:

I install wmaker using synaptic, it installs libwraster along with it.
I purge wmaker out using synaptic, it leaves libwraster. I have to manually search for it and uninstall.

Now this may not seem a big deal, but imagine if wmaker had 20 dependencies.
On the other hand:

I install wmaker using aptitude, it installs libwraster with it.
I purge wmaker out using aptitude, it figures out libwraster isn't needed anymore, and gets rid of that too.


Awesome, isn't it?
But I held back from using this rather nifty tool because I didn't want to learn how to use it. Now I can use it, at least to do simple tasks. So I thought I would share that knowledge.

aptitude can run in two modes:
  1. command line mode
    I will not write about this, other than to say the commands stay like apt-get .. which means you get aptitude power with apt-get commands.
    For eg.,
    sudo aptitude install wmaker
    sudo aptitude update
    sudo aptitude upgrade

    Note: to do a default upgrade, use the commandline above. Pressing U in the gui seems to do a smart upgrade, and that isn't something I always want.
  2. gui mode
    You start this with: sudo aptitude

    f10 : pulls down the menu
    Note: it seems f10 pulls down the gnome-terminal menu. If you want to use f10, then you may need to turn off the gnome-terminal menu for the session. Alternately, just click on the aptitude menu, the mouse click works.
    q : quit
    u : updates package lists
    / : search for a package (firefox style)
    n : find next
    f : forget new packages, useful if you have a habit of peeking into new packages available after each update.

    Once you have found your package,
    enter: to see information about that package
    + : mark a package for install or upgrade
    - (minus) : mark a package for removal
    _ (underscore): mark a package for purging
    : : cancel any action on the selected package

    U: to mark all upgradable packages (for upgrade )
    Once you have marked your changes,
    g : apply those changes

    If you are in a screen which says displays package information, and you want to go back to the earlier screen, press f6 or q.

Once you press g, all the changes get listed. You can modify any of the changes, and then press g again to finally apply marked changes. I'll keep adding to this HOWTO as I learn new things, and if you have any suggestions/tips/corrections please add to this thread .. I'll update this post.

Last edited by tread; August 12th, 2005 at 08:14 PM.. Reason: Some more commands
tread is offline   Reply With Quote
Old May 28th, 2005   #2
Xian
Chocolate-Covered Ubuntu Beans
 
Xian's Avatar
 
Join Date: Oct 2004
Location: 37.8N 97.2W
Beans: 2,193
Dapper Drake Testing/
Send a message via AIM to Xian
Re: HOWTO: use aptitude instead of synaptic and why.

Quote:
Originally Posted by tread
Why should you use aptitude over synaptic/apt-get?
The million dollar reason: it remembers dependencies downloaded to install a particular package and removes them automatically when you remove that package. Synaptic only gives you the history log, and apt-get (as far as I know) not even that.
The million and and half dollar reason I'd say. Nice job.
__________________
Everybody can be great because everybody can serve.
You only need a heart of grace. A soul generated by love.

- Martin Luther King, Jr.

Help A Child Today
Xian is offline   Reply With Quote
Old May 28th, 2005   #3
tread
Extra Foam Sugar Free Ubuntu
 
Join Date: Apr 2005
Beans: 737
Re: HOWTO: use aptitude instead of synaptic and why.

Thanks .. I had been putting off using aptitude because synaptic is so much easier. I don't think I'll be moving from aptitude for a while now though
tread is offline   Reply With Quote
Old May 28th, 2005   #4
kvidell
Dipped in Ubuntu
 
kvidell's Avatar
 
Join Date: May 2005
Location: Fremont, California, USA
Beans: 533
Ubuntu 6.10 Edgy
Send a message via AIM to kvidell Send a message via MSN to kvidell Send a message via Yahoo to kvidell
Re: HOWTO: use aptitude instead of synaptic and why.

But I've removed stuff with apt-get before and it removes all of the stuff that came with the application as long as it's not needed by anything else.

Although, when you do an update in aptitude I will give you that it's a lot prettier if you have terminal colours enabled
- Kev
__________________
Reg. Linux User #389145
ThinkPad T42p running Breezy (with [Multi/Uni]verse, Marillat, Sarge, Cipherphunk and BMPx repos). All (sub)systems are a GO.
Kill all the Spiders to save the Butterflies. Is this what we call Eden?
Last.FM
kvidell is offline   Reply With Quote
Old May 28th, 2005   #5
tread
Extra Foam Sugar Free Ubuntu
 
Join Date: Apr 2005
Beans: 737
Re: HOWTO: use aptitude instead of synaptic and why.

Quote:
But I've removed stuff with apt-get before and it removes all of the stuff that came with the application as long as it's not needed by anything else.
Doesn't work for me then .. I have to remove (using the same wmaker example) libwraster manually.
tread is offline   Reply With Quote
Old May 28th, 2005   #6
kvidell
Dipped in Ubuntu
 
kvidell's Avatar
 
Join Date: May 2005
Location: Fremont, California, USA
Beans: 533
Ubuntu 6.10 Edgy
Send a message via AIM to kvidell Send a message via MSN to kvidell Send a message via Yahoo to kvidell
Re: HOWTO: use aptitude instead of synaptic and why.

ooOoo.. You're right. weird. (I just tried wmaker)
I remember an asterisk removal being quite complete and getting rid of everything.

Odd.
- Kev
kvidell is offline   Reply With Quote
Old May 28th, 2005   #7
bobgreen5s
Just Give Me the Beans!
 
Join Date: Apr 2005
Beans: 68
Re: HOWTO: use aptitude instead of synaptic and why.

Quote:
Originally Posted by tread
Why should you use aptitude over synaptic/apt-get?
The million dollar reason: it remembers dependencies downloaded to install a particular package and removes them automatically when you remove tahat package. Synaptic only gives you the history log, and apt-get (as far as I know) not even that.
Not to bash apitude but this might not always be a good thing. Lets say you install package a and b and package a and b required dependency a. If you decide you want to remove package a but keep package b then dependency a is removed so you won't be able to use package b. Correct me if I'm mistaken.
bobgreen5s is offline   Reply With Quote
Old May 28th, 2005   #8
willis
A Carafe of Ubuntu
 
Join Date: Dec 2004
Location: London UK
Beans: 21
The Feisty Fawn Testing
Re: HOWTO: use aptitude instead of synaptic and why.

i've always used apititude, i just find it fast and powerful,

aptitude will only uninstall packages if there aren't conflicts,

it's really easy to tweak various actions by pressing "g" to see what it will do, and then pressing "Esc" changing various packages and then pressing g again to see if you've fixed any inconsistencies etc... it works really well, espieccally if you're running something like breezy where packages get messed around with a lot
willis is offline   Reply With Quote
Old June 13th, 2005   #9
escobar
A Carafe of Ubuntu
 
Join Date: Jun 2005
Beans: 110
Ubuntu Breezy 5.10
Re: HOWTO: use aptitude instead of synaptic and why.

Quote:
Originally Posted by tread
HOWTO: use aptitude instead of synaptic

What is aptitude?
Aptitude is a package manager for Debian and Debian based systems (similar to say, synaptic).

Why should you use aptitude over synaptic/apt-get?
The million dollar reason: it remembers dependencies downloaded to install a particular package and removes them automatically when you remove that package. Synaptic only gives you the history log, and apt-get not even that.
For example:

I install wmaker using synaptic, it installs libwraster along with it.
I purge wmaker out using synaptic, it leaves libwraster. I have to manually search for it and uninstall.

Now this may not seem a big deal, but imagine if wmaker had 20 dependencies.
On the other hand:

I install wmaker using aptitude, it installs libwraster with it.
I purge wmaker out using aptitude, it figures out libwraster isn't needed anymore, and gets rid of that too.


Awesome, isn't it?
But I held back from using this rather nifty tool because I didn't want to learn how to use it. Now I can use it, at least to do simple tasks. So I thought I would share that knowledge.

aptitude can run in two modes:
  1. command line mode
    I will not write about this, other than to say the commands stay like apt-get .. which means you get aptitude power with apt-get commands.
    For eg.,
    sudo aptitude install wmaker
  2. gui mode
    You start this with: sudo aptitude

    f10 : pulls down the menu
    q : quit
    u : updates package lists
    / : search for a package (firefox style)
    n : find next
    f : forget new packages, useful if you have a habit of peeking into new packages available after each update.

    Once you have found your package,
    enter: to see information about that package
    + : mark a package for install or upgrade
    - (minus) : mark a package for removal
    _ (underscore): mark a package for purging
    : : cancel any action on the selected package

    U: to mark all upgradable packages (for upgrade )
    Once you have marked your changes,
    g : apply those changes

    If you are in a screen which says displays package information, and you want to go back to the earlier screen, press f6 or q.

Once you press g, all the changes get listed. You can modify any of the changes, and then press g again to finally apply marked changes. I'll keep adding to this HOWTO as I learn new things, and if you have any suggestions/tips/corrections please add to this thread .. I'll update this post.
Hate to sound really stupid here. In Aptitude, what's the difference between purging and removing something? Does "purge" remove the dependencies installed with a given package, and "removal" ignore the dependencies but remove the packege itself?
escobar is offline   Reply With Quote
Old June 14th, 2005   #10
tread
Extra Foam Sugar Free Ubuntu
 
Join Date: Apr 2005
Beans: 737
Re: HOWTO: use aptitude instead of synaptic and why.

Purging removes the config files too, remove doesnt do that. For example, if you install a package and modify some settings remove will keep those changes while purge will get rid of them.
tread is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:01 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry