Knowledge Base:Masking a package

Synopsis
Article description::On occasion it is necessary for Portage to not take into account a certain package or a specific version of a certain package. Reasons for such actions could be because the new version fails to work, a major upgrade breaks compatibility with the current system in production, drops a specific, etc.

Environment
Any Gentoo installation.

Analysis
Portage knows how to understand package masks. System administrators can mask any package they do not desire to have on their system. The scope of the package mask is left up to the administrator; a mask can be applied to all versions of a package, specific package versions, and versions of packages from specific ebuild repositories.

Masking a specific package version
To mask versions newer than :

If it does not exist already exist, create the file:

Alternatively, when organizing under a directory, create the directory:

Create the directory:

Create a file for the mask operation Portage will perform:

Masking a specific package from an ebuild repository
Create the directory has been created:

Create a file to mask packages of the name from an ebuild repository entitled "larry":