All » Articles » Linux (2)

Fileclean: find unused files on your Mandriva Linux

Posted by: Ferenc Veres on August 28, 2005 09:09:33 PM +00:00(11278 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...

There are no comments attached to this item, be the first to post.

(required)

(required but not published)

About me

Photo of me Ferenc Veres
web developer
about me

Commodore books
Commodore logo My C64 and Plus/4 book collection (Hungarian): Commodore könyvek
Featured article

Exisitng editors for text data DjVu files are quite limited, like for example DjVuSmooth. So I've implemented a new editor in JavaScript, that allows editing both the strucutre of the text (paragraphs, lines, words,...) and the coordinates of the text boxes by simply dragging with the mouse, features like create, delete, merge are also available.

My other websites
Categories
My hosting choice

My affiliate link to the hosting center:

InterServer Web Hosting and VPS