[TriLUG] debian (actually ubuntu) and apt-get

Cristóbal Palmer cristobalpalmer at gmail.com
Wed Apr 18 18:22:33 EDT 2007


Stan,

While apt-get is fine, aptitude makes it easier to quickly see what's
going on during an upgrade and find out what a pesky package is doing
(dependency-wise) without having to leave the interface.

I recommend getting familiar with it. Here's a quick walkthrough.

(0) turn off keyboard-based menu access in your terminal emulator

aptitude uses F10 to get to its menus, and some terminal emulators are
squatting on that. disable that in your gnome-term or whatever.

(1) 'sudo aptitude'

this fires up aptitude in its curses-based interactive mode

(2) disable installation of "recommended" packages by default

aptitude likes to pull in "recommended" packages by default. To
disable this, go to the menu (F10) 'Options' -> 'Dependency handling'.
Use the space bar to un-check "Install Recommended Packages
Automatically" and then hit okay.

(3) 'u'

this tells aptitude to update its package list from the repos.

(4) 'U'

this is equivalent to 'dist-upgrade' on the command line. If there are
updates, you'll see in the top right that it will tell you how much
disk will be freed or used by the upgrade.

(5) 'g'

This will take you to a screen that shows packages to be installed
(green), packages to be upgraded (light blue), removed (purple), etc.
You can arrow down to any of them and hit enter to view detailed
package info. You can also make changes to what will be installed by
hitting '-' to remove, '_' to purge (remove and remove config files),
'+' to add (a recommended package, for example). The menus will show
you all the keyboard shortcuts and options...

(6) 'g' (again)

This will send aptitude on its way, actually doing the upgrade/install/etc.

(7) use the regex search

If you type '/' when aptitude first comes up, you'll be presented with
a search box. The great thing about this box is that you can enter
'^php5$' (for example) and it will take you right to the package named
'php5' instead of to 'php5-dev', which is what you'll get if you put
'php5' in the search box, and then have to use 'n' to go to the next
search result a couple of times before actually getting to 'php5'. Use
the regex-capable search box for great justice!

I hope the above is helpful. A curses-based interface is a bit of a
pain at first, but after a little adjustment, aptitude can be really
nice. When I'm doing a dist-upgrade, I want to quickly know exactly
what it's pulling, and it's nice to be able to fiddle before it takes
off.

Cheers,
CMP

On 4/18/07, stan briggs <stan at stanbriggs.com> wrote:
> alan,
>
> your suggestions below fixed the problem beautifully.
>
> now, does this mean that the below set of commands would be good to run
> regularly?
>
> thanks,
> stan


-- 
Cristóbal M. Palmer
http://claimid.com/cristobalpalmer
TriLUG Vice Chair


More information about the TriLUG mailing list