Dec 8, 2010

Cleaning my Debian system

I've come across some utilities that help in removing old files that lie on the filesystem and all they do is waste disk space.

There are some debian tools to deal with "orphaned" packages, like deborphan. Its usage is pretty simple:

# deborphan
.. follows a list of "orphaned" packages

I find more interesting the utility named "cruft". I use it like this:

# cruft -d /usr/lib > report.cruft.txt

This checks for files that must be in the system and files that should not be in the filesystem.

# cat report.cruft.txt | grep libGL

These files should not have been there. So, I can delete them.

I'm not aware of all the options yet, but I'll look into it when I have some time to spend...

It's convenient to check what package provides some file:

# apt-file search
fglrx-glx: /usr/lib/
fglrx-glx: /usr/lib/
libgl1-mesa-glx: /usr/lib/
libgl1-mesa-glx: /usr/lib/

Also, you can use dpkg:

# dpkg -S

No comments: