Gentoo tips: Cleaning /usr/portage/distfiles

Translation of the original in Catalan. Read it in: CatalàCastellano

Gentoo users accumulate junk in /usr/portage/distfiles, which is where the 'tarballs' with the source code to be compiled by our system are downloaded, so we need to clean it up from time to time and what better way to do it than a script that does the cleaning all by itself:

This script looks for all the ebuilds in the /var/db/pkg directory (they correspond to the installed programs) and, relying on the Portage scripts, builds a list of the files those ebuilds would need if they had to be reinstalled. Then, every file inside distfiles that is not in the list is a file to delete.

This piece of news comes from Gentoo-es and is titled: Script para limpiar /usr/portage/distfiles. If you want more information about the subject in the forum there is a thread called: Clean out your world file.

4 comments

Comments from the old blog, as they were written. Comments are closed.

  1. —

    El problema ve quan compartim el distfiles per NFS amb 6 màquines diferents... llavors el script no serveix :(

  2. —

    No serveix perquè necessites les versions antigues dels programes?

  3. —

    [2] No, no serveix per que nomes t'esborra les versions antigues del que tens instal·lat a la màquina on executes el script (fixa't que per fer-ho verifica en local contra /var/db/pkg/).

    Si executem el script desde el server... on no hi ha X, ni KDE, ni gnome, ni tot el q està enfocat a escriptori, que es el que acaba "engordant" el distfiles, eliminem ben poc, i ens quedem igualment amb un distfiles inmens.

  4. —

    [3]

    Tens tota la raó ja no m'enrecordava d'aquest detall. Bona observació.