--install,
--remove,
--configure, etc.
foo.deb package file
pre-blah and post-blah scripts
for a package
/etc/apt/sources.list
Packages file
install foo,
uninstall foo)
dpkg to perform each package status change
dpkg: resolve all relationships yourself
dselect: text console GUI, predates APT
apt-get, apt-cache and friends
aptitude: APT command-line and text console GUI
$ dpkg-query --show --showformat '${description}\n' aptitude
terminal-based apt frontend
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 extreme flexibility and customization.
aptitude is also Y2K-compliant, non-fattening, naturally cleansing, and housebroken.
aptitude commands
aptitude as a normal user
$ aptitude
q: Quit current level, back to previous operation
F10: Menu activation
?: Help on shortcuts
Ctrl + U: Undo latest package change
u: Update package list
g: Go to next step
↑ and ↓:
move selection highlight
Enter:
close or open selected group one level
[ and ]:
open or close all levels of selected group
iu autobook +139kB 1.4.1-1 1.4.2-1 i A gettext-base 0.14.1-10 0.14.1-10
/ to open search dialogue
Ok (press Enter) to close search
n for next matching package
l to open limit dialogue
Ok (press Enter) to set the limit
. to match all packages
F10
→ Search
→ Un-Limit Display
+: request installation
-: request removal
=: request hold
Ctrl+U: undo a request
root
F10
→ Actions
→ Become root
i —
installed: successfully installed to system
c —
config: package not installed, but configuration files remain
p —
purged: package has no files on system
v —
virtual: package does not exist, but another "Provides" it
B —
broken: dependencies unresolved, fix required
u —
unpacked: only files unpacked, not configured
C —
half-configured: configuration failed, fix required
H —
half-installed: removal failed, must be reinstalled
i —
install: not currently installed, get latest version
u —
upgrade: currently installed, get latest version
d —
delete: uninstall, don't touch config files
p —
purge: uninstall, remove config files
h —
hold: don't upgrade from current version
F —
forbid: don't upgrade to latest version
r —
reinstall: re-run installation and configuration
B —
broken: dependencies not satisfied, fix required
A flag), remove package when not needed
m ("manual"):
Unset automatic flag when a package is useful by itself
M ("not-manual"):
Set automatic flag when a package is of no interest
aptitude
u:
Update current package list from repositories
Packages files
U:
Request upgrade of all packages with newer versions
g:
Go ahead with requests
g:
Go ahead with actions
foo.deb files
dpkg for each change
q to quit
aptitude commandsaptitude like apt-get
$ sudo aptitude install foo bar baz $ sudo aptitude remove larry curly moe $ sudo aptitude purge good bad ugly
$ sudo aptitude update $ sudo aptitude upgrade
cron job:
$ sudo crontab -l | grep aptitude 00 05 * * * aptitude update && aptitude upgrade --assume-yes --download-only
$ sudo aptitude install --with-recommends foo bar baz
aptitude like apt-cache
and dpkg-awk
$ aptitude show foo bar baz
$ aptitude search '^foo' # starting with "foo" $ aptitude search '^foo$' # exactly "foo" $ aptitude search '^(foo|bar)' # starting with either "foo" or "bar"
mutt-style patterns:
$ aptitude search '~b' # broken packages $ aptitude search '~Dfoo' # packages that Depends: foo $ aptitude search '~N' # new packages (since last "forget") $ aptitude search '~N~mdaniels # new packages maintained by Daniel Stone
foo.deb without changing the status:
$ aptitude download foo $ aptitude download foo=1.2.3-1
$ aptitude changelog foo $ aptitude changelog foo=1.2.3-1
$ aptitude markauto foo $ aptitude unmarkauto foo
$ aptitude forget-new
$ aptitude --help | tail --lines 1
This aptitude does not have Super Cow Powers.
$ apt-get --help | tail --lines 1
This APT has Super Cow Powers.
apt-get:
$ aptitude moo
There are no Easter Eggs in this program.
$ apt-get moo
(__)
(oo)
/------\/
/ | ||
* /\---/\
~~ ~~
...."Have you mooed today?"...
F10
→ h
→ m
)
sudo aptitude install aptitude-doc-en
file:///usr/share/doc/aptitude/html/en/index.html
http://www.luv.asn.au/presentations/