Mind > Articles > Linux (1)
Mind > Downloads (6)

Fileclean: find unused files on your Mandriva Linux

Linux
Beküldte: Ferenc Veres, időpont: 2005. Augusztus 28. 09:09:33 du +00:00.(8644 Reads)
Ever wondered what extra files you might have on your harddisk, left there by once installed programs or deprecated packages left there by distro upgrades? Try this little script to hunt them down.

This little shell script can analyze your installed RPM base.

What it does 

  1. By checking the available package lists of your configured URPMI sources it can find which RPMs were not directly installed from those, so may be just left around. This is a simple comparison of the output of the "rpm -qa" and the "urpmq -r --list" commands.

  2. By comparing full RPM file-list and actual files on your harddisk it will also list programs which were compiled by you or installed other ways. This is a simple comparison of "rpm -qal" and a "find / -type f" excluding some custom directories like /home, /mnt, /dev, etc. which are unlikely to contain any RPM files.

Using the 2 resulting files you can easily identify what programs you or your distro-upgrade left there unused anymore.

The program does not uninstall or delete anything! It will just compose two file lists for your further examination! 

Example results

The RPM packages what I currently have on my system, but are not available on any of my configured URPMI package sources: RESULT-nonavail-rpms.txt.

The files what I have on my system whose actually do not belong to any installed RPM's file list: RESULT-nonrpm-files.txt.

Note that both lists may contain programs what you use and should not remove. The second list may contain files what are important to some of the programs you use, as this list contains a lot of configuration files created by programs in your RPMs and you should not delete those.

Good examples of my unnecessary files are for example: the unused wine installation in /usr/local (I use the official RPM now), ispell source code package (in /usr/src/RPM/SOURCES), or the outdated kde-i18n-hu-3.3 RPM package (I use kde-3.4 actually).

Have a nice cleanup! :-)

Download 

You can download the very simple shell script here.

NO WARRANTY, AS IS...