I know how to upgrade Gentoo to use the latest version of all installed software marked with the testing keyword, namely by editing the ACCEPT_KEYWORDS line in /etc/portage/make.conf to:


where ARCH is the architecture of the system, e.g. amd64 for x86-64 systems. This question is instead how to use the latest versions of all software that is in the presently-enabled overlays, including those with empty keyword fields. For example sys-devel/gcc-7.1.0-r1 presently has this keywords field in its ebuild:


I know it is marked with no keywords because it is experimental and may cause system breakage. I know this upgrade may cause system breakage so I have been warned but I just want to know how do I upgrade to a Gentoo experimental system (where a Gentoo 'testing' system would have the ~ARCH keyword) with the latest available versions of all installed software.

EDIT: I thought I made myself clear by having "all installed software" in the title of this question but by the first comment I apparently did not. I want to upgrade ALL installed software to the very latest, including those marked with empty keywords fields.

  • Add a line sys-devel/gcc to the file /etc/portage/package.accept_keywords (create this file if not present).
    – jimmij
    Commented Jun 18, 2017 at 18:58
  • I know how to do it on a package-by-package basis I mean all packages (which I did say in the title of this question, "of all installed software") I want to upgrade to the very latest.
    – Josh Pinto
    Commented Jun 18, 2017 at 20:23
  • You could try */* pattern, but I bet there will be some unresolved dependencies in such extreme case.
    – jimmij
    Commented Jun 18, 2017 at 22:26

1 Answer 1


Create the following file (as jimmij suggested to you):


In said file, add an entry like so (comments added for explanation, reasoning below example file):

# The following values are permitted for arch:
# ** indicates a package with no keywords.  These are the 
# packages usually hard masked.
# ~arch, where arch is your platform type, will download testing versions.
# arch, where arch is your platform type, will download stable versions.
# This is the convention used in make.conf.

#Package Name            #Arch
sys-devel/gcc            **
package-cat/package      arch_keyword

# It's also acceptable to version lock a package.  
# Note that the arch is also needed, when a package has
# no keywords, or is in testing.

#Package Name                  #Arch
=sys-devel/gcc-6.3.0           **
<=sys-devel/gcc-3.4.6-r2       amd64
=package-cat/package-9999      **

Upgrading to the bleeding edge in the way your asking is only possible using the method jimmij and I are proposing, due to the fact that not every package in Gentoo's tree has a hard-masked package or a 9999 package. For this reason there is no way to globally keyword your system using make.conf.

The closest you'll get is is to use app-portage/layman to add and manage overlays, then add each package that has a masked version to package.accept_keywords, and then create a custom profile using your keywords file. Lastly, use eselect profile to switch to your custom profile. For an example of how to do this properly visit Sabayon Linux, and the Sabayon GitHub repository. The GitHub repository contains multiple overlays that turn a vanilla Gentoo Installation into a full fledged Linux Distribution with it's own package manager. See also ChromiumOS, which uses a customized Gentoo Tree to build Chrome and ChromeOS for ChromeBooks. Note that the tree is internal to Google.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .