Gentoo Portage basics 25 May 2005 at 00:00

Updating the tree

  emerge --sync

Searching for software

  emerge --search search_string
Include descriptions in search:
  emerge --searchdesc search_string 

Installing software

  emerge software_name

Uninstalling software

  emerge --unmerge software_name

Updating software

Update the portage tree (see above) and then either:

1. Update installed packages without looking at dependencies

  emerge --unmerge software_name

2. Update everything on your system.

  emerge --update --deep world 

3. Update everything on your system ensuring that any new variable settings are applied.

  emerge --update --deep --newuse world 

Removing orphaned dependencies

Update the portage tree, and then check what dependencies will be removed:
  emerge --update --deep --newuse world
  emerge -p --depclean
The -p flag tells portage to show you what will be removed. If you are happy with the list, continue with the following commands:

  emerge --depclean
  revdep-rebuild

The "revdep-rebuild" command is dependent on the "gentoolkit" package which you may need to emerge if you have never done so.