home news CSS-Menu fun links top eMAIL
en de



gcruft

helps finding orphaned files on a gentoo system


background
Gentoo, like any other linux system, gets more and more messy after time.
Broken ebuilds making changes to the filesystem without noting the package manager, old files or outdated configuration directories in the /etc directory, that have not been cleaned up, stuff you put temporarily somewhere some time ago, because there was much space left on the /usr partition... and many many other reasons.
Finding those orphaned files, sometimes also called cruft, can be really painful and is sometimes not even reliably possible. So some clever guys wrote some shellscripts to reduce the number of potential wastefiles.
Contrary to popular belief, gentoo and as a consequence portage (or the "alternatives") have changed much in the past years. So those scripts became more and more inaccurate after some time. Most were also too unflexible to adjust them.
After I trashed my root partition, but had /usr and other directories still left, since they were on separate partitions, I did a quick fix, un-tar-ed the latest stage3 and re-emerged many stuff. But there were still some files, that were a leftover from some ancient ebuilds. Then I remembered the findcruft script. But as already mentioned, it didn't work too well. Some ebuilds installed to /lib, some to /lib32 or to /lib64. There were also many false positives, since it became common practice to use the pkg_postinst() hook of an ebuild and copy files directly to the live system, which results in the package manager not recording this file as one of the package's. Eselect had become more and more popular and now "pollutes" the environment. So I decided to start a new findcruft, which is now, after some time lying waste, finally released.

description
Well, if you know findcruft, there's probably nothing more to say.
It is a piece of software, that tries to help you cleaning up or keeping clean your gentoo system. It creates a list of files on your system and then removes those files from the list, which belong to an ebuild. After that some exceptions are applied, which further remove files, that are unmaintained, but known to belong to certain packages. At the end the list should only contain orphaned files. But as many ebuilds install files so they aren't recognized by portage, there will always be many false positives, so be really careful when deleting files stated as orphaned.

dependencies & installation
dependencies:
installation:

assuming that your portage-overlay folder is /usr/local/portage/ do the following as root:

cd /usr/local/portage
mkdir app-portage
cd app-portage
svn co https://svn.keksbude.net/repos/keks-overlay/app-portage/gcruft/
emerge -av gcruft

configuration & running that thing
Most of the configuration is automatically made by the ebuild from my overlay. So you just have to check the config in /etc/gcruft/config.pm.
If I can spend some time, I will also provide a more decent README. To start gcruft, just type
gcruft > cruftfiles
as root. After it has finished, cruftfiles contains a list of files, that are not necessarily waste, but it may give you hints what could be deleted.

downloads
The ebuild should be downloaded from the keksbude gentoo overlay(subversion repository), which can be viewed here

top
Valid HTML 4.01! Valid CSS! Diese Seite ist illegal! Fight SpamBots! hosted on keksbude.net best viewed with: any standards compliant browser
last updatessome stats
inc/projects/gcruft/en/: Mon Apr 25 05:33:11 2011(GMT)your UA: CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
/index.cgi: Fri Aug 5 20:54:29 2011(GMT)your IP: 38.107.179.221
it took 0.001282 seconds to assemble this page.