Linux package manager commands cheat sheet

Linux package manager commands cheat sheet.

Yum package manager Linux (Yellowdog updater modified).

Install package.

yum install packagename

Update a package.

yum update packagename

Check for updates.

yum check-update

Update a system.

yum update

Search for packages.

yum search packagename

Remove a package (Caution check what your confirming of removing as this will include dependencies sometimes that you dont want to remove).

yum remove packagename

APT-GET  package manager Linux (Advanced packaging tool).

Install package.

apt-get install packagename

Upgrade a package, this is the same as installing.

apt-get install packagename

Check for updates.

apt-get update

Update a system.

apt-get update && apt-get upgrade

Search for packages.

apt-cache search packagename

Removing a package (Not as risky as yum regarding removing dependencies you still need, but still always check what your removing).

apt-get remove packagename

Aptitude package manager Linux (Advanced package tool front end).

Install package.

aptitude install packagename

Update a package.

aptitude install packagename

Check for updates.

aptitude update

Update a system.

aptitude update && aptitude safe-upgrade

Search for a package.

aptitude search packagename

Removing a package (Not as risky as yum regarding removing dependencies you still need, but still always check what your removing).

aptitude remove packagename

To launch Aptitude’s text user interface.

aptitude

RPM package manager Linux (RPM package manager formerly known as Red Hat package manager).

Installing a package.

rpm -i package.rpm

Upgrading a package.

rpm -U packagename

Remove a package excluding dependencies.

rpm -e --nodeps packagename

Search for installed packages  (not piping to grep will list all installed packages).

rpm -qa | grep searchterm

Show package information.

rpm -qi packagename

DPKG package manager Linux (Debian package manager system).

Install or upgrade a package.

dpkg -i packagename.deb

Remove a package.

dpkg -r packagename

Search for installed packages (not piping to grep will list all installed packages).

dpkg -l | grep searchterm

slapt-get package manager Linux (A version of apt-get for Slackware).

Install package.

slapt-get --install packagename

Upgrade a package, this is the same as installing.

slapt-get --install packagename

Check for updates.

slapt-get --update

Update a system.

slapt-get --update && slapt-get --upgrade

Removing a package (Always check what your removing).

slapt-get --remove packagename

 

Portage (The package manager used by Gentoo, I think this is a fork/Linux version of ports used by BSD if it isn’t it works in a similar way) .

Install something.

emerge usbutils

Be prompted first.

emerge --ask usbutils

Simulate an Install.

emerge -pv usbutils

Rebuild kernel modules.

emerge --ask @module-rebuild

Install from a binary.  This needs a lot more in depth (but good for cheat sheet).

emerge -k usbutils

local binaries, if not available will install from source.

emerge -K usbutils

Will only use local binaries, no source.

emerge -g usbutils

Will install local or remote binaries(PORTAGE_BINHOST), or from source

emerge -G usbutils

(Same as the above but will only install from local or remote binary)

Upgrade.

As portage is a ‘package manager’ for a rolling release there isn’t a straight update feature. You have to sync with the Portage tree and then upgrade so will probably cover this in a later post.

There is alot more you can do with these for more info read the man pages (very useful).

i.e

man yum

Or type for more info on what a man page does (man is the manual).

man man

Linux , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

2 × 3 =