msgbartop
A chronological documentation test project, nothing serious, really!
msgbarbottom

25 Mar 2008 aptitude cheatsheet

aptitude is a great alternative to apt-get and the best way to install, remove, upgrade, and otherwise administer packages on you system with apt. aptitude solves orphaned dependencies and has a curses interface that blows the doors off of dselect. Finally, and most importantly, it takes advantage of one tool, doing many many operations:

Syntax Description
aptitude Running it with no arguments brings up a curses based interface to search, navigate, install, update and otherwise administer packages
aptitude install Installing software for your system, installing needed dependencies as well
aptitude -d install Download packages to the package cache as necessary, but do not install or remove anything.
aptitude remove Removing packages as well as orphaned dependencies
aptitude purge Removing packages and orphaned dependencies as well as any configuration files left behind
aptitude search Search for packages in the local apt package lists
aptitude update Update the local packages lists
aptitude upgrade Upgrade any installed packages that have been updated
aptitude clean Delete any downloaded files necessary for installing the software on your system
aptitude dist-upgrade Upgrade packages, even if it means uninstalling certain packages
aptitude show Show details about a package name
aptitude autoclean Delete only out-of-date packages, but keep current ones
aptitude hold Fix a package at it’s current version, and don’t update it

aptitude uses many of the same commands as apt-get. It is not a good idea to use both, you should either use aptitude or apt-get exclusively, or your dependencies might get confused.

Tags: , , ,

Posted by

19 Mar 2008 dpkg command cheatsheet

Syntax Description Example
dpkg -i {.deb package} Install the package dpkg -i zip_2.31-3_i386.deb
dpkg -i {.deb package} Upgrade package if it is installed else install a fresh copy of package dpkg -i zip_2.31-3_i386.deb
dpkg -R {Directory-name} Install all packages recursively from directory dpkg -R /tmp/downloads
dpkg -r {package} Remove/Delete an installed package except configuration files dpkg -r zip
dpkg -P {package} Remove/Delete everything including configuration files dpkg -P apache-perl
dpkg -l List all installed packages, along with package version and short description dpkg -l
dokg -l | less
dpkg -l ‘*apache*’
dpkg -l | grep -i ‘sudo’
dpkg -l {package} List individual installed packages, along with package version and short description dpkg -l apache-perl
dpkg -L {package} Find out files are provided by the installed package i.e. list where files were installed dpkg -L apache-perl
dpkg -L perl
dpkg -c {.Deb package} List files provided (or owned) by the package i.e. List all files inside debian .deb package file, very useful to find where files would be installed dpkg -c dc_1.06-19_i386.deb
dpkg -S {/path/to/file} Find what package owns the file i.e. find out what package does file belong dpkg -S /bin/netstat
dpkg -S /sbin/ippool
dpkg -p {package} Display details about package package group, version, maintainer, Architecture, display depends packages, description etc dpkg -p lsof
dpkg -s {package} | grep Status Find out if Debian package is installed or not (status) dpkg -s lsof | grep Status

{package} – Replace with actual package name

Tags: , , ,

Posted by

19 Mar 2008 rpm command cheatsheet

This is a simple cheatsheet for the rpm command and can be used on systems like RedHat that uses the command

Syntax Description Example(s)
rpm -ivh {rpm-file} Install the package rpm -ivh sendmail-cf-8.14.2-1.fc8.rpm
rpm -ivh –test sendmail-8.14.2-1.fc8.rpm
rpm -Uvh {rpm-file} Upgrade package rpm -Uvh sendmail-cf-8.14.2-1.fc8.rpm
rpm -Uvh –test sendmail-8.14.2-1.fc8.rpm
rpm -ev {package} Erase/remove/ an installed package rpm -ev sendmail
rpm -ev –nodeps {package} Erase/remove/ an installed package without checking for dependencies rpm -ev –nodeps sendmail
rpm -qa Display list all installed packages rpm -qa
rpm -qa | less
rpm -qi {package} Display installed information along with package version and short description rpm -qi sendmail
rpm -ql {package-name} List files in package rpm -ql sendmail
rpm -qf {/path/to/file} Find out what package a file belongs to i.e. find what package owns the file rpm -qf /etc/passwd
rpm -qf /bin/bash
rpm -qc {pacakge-name} Display list of configuration file(s) for a package rpm -qc httpd
rpm -qcf {/path/to/file} Display list of configuration files for a command rpm -qcf /usr/bin/locate
rpm -qa –last Display list of all recently installed RPMs rpm -qa –last
rpm -qa –last | less
rpm -qpR {.rpm-file}
rpm -qR {package}
Find out what dependencies a rpm file has rpm -qpR sendmail-8.14.2-1.fc8.rpm
rpm -qR bash
rpm –test {package} Perform Installation Tests Only rpm -i –test rpm-2.0.11-1.i386.rpm
/bin/rpm conflicts with file from rpm-2.3-1
/usr/bin/gendiff conflicts with file from rpm-2.3-1
/usr/bin/rpm2cpio conflicts with file from rpm-2.3-1
/usr/bin/rpmconvert conflicts with file from rpm-2.3-1
/usr/man/man8/rpm.8 conflicts with file from rpm-2.3-1
error: rpm-2.0.11-1.i386.rpm cannot be installed
rpm –replacepkgs Install the Package Even If Already Installed. Is used to force RPM to install a package that it believes to be installed already. This option is normally used if the installed package has been damaged somehow and needs to be fixed up.

{package} – Replace with actual package name

Tags: ,

Posted by