Pin Me

Linux Command Line: cruft-remover

written by: jlwallen•edited by: Michael Dougherty•updated: 12/22/2008

After you've used a Linux system for a while there could be a lot of application-related files that are no longer necessary. These files can be hard to locate, but removing the in sum total can save you a good amount of space. This Linux Command Line article will introduce you to cruft-remover.

  • slide 1 of 4

    What is cruft?

    The word cruft in terms of computers, can have a couple of meanings. The first meaning is for software or code that is poorly written. The other meaning is for the accumulation of redundant, uncessary, or irrelevant information. The latter is applicable to the Linux command line application cruft-remover.

  • slide 2 of 4

    What is cruft-remover?

    The cruft-remover application searches through your system to find anything that shouldn't be on your system. Cruft can include:

    Packages that were installed because they were dependencies of another application but are no longer needed.

    Packages that are no longer supported by the current release of the operating system.

    In order to use cruft-remover you have to have root (or sudo) access.

  • slide 3 of 4

    Basic Usage

    The simplest usage of cruft-remover is:

    cruft-remover [OPTIONS] ACTION

    The possible options are:

    • --all: Remove all pieces of cruft.
    • --no-act: Do not actually remove anything. This is the best way to check your system for cruft without making any changes.
    • --verbose: Print out descriptions of each piece of cruft found.

    Actions are:

    • find: This searches for cruft and prints a list of each piece.
    • cleanup: This actually removes the cruft found.
    • ignore: Mark cruft as "ignored" or "removable".

    Let's say you want to first check your system for cruft but you do not want to take any action on any cruft found. To do this you could enter the command:

    cruft-remover --no-act find

    This would spit out something like this:

    emovable deb:ooobasis3.0-testtool

    removable deb:ooobasis3.0-writer

    removable deb:ooobasis3.0-xsltfilter


    removable deb:openoffice.org3

    removable deb:openoffice.org3-base

    removable deb:openoffice.org3-calc

    removable deb:openoffice.org3-dict-en

    removable deb:openoffice.org3-dict-es

    removable deb:openoffice.org3-dict-fr

    removable deb:openoffice.org3-draw

    removable deb:openoffice.org3-en-us

    removable deb:openoffice.org3-impress

    removable deb:openoffice.org3-math

    removable deb:openoffice.org3-writer

    removable deb:opera

    removable deb:tuxcards

    So let's say I want to remove the deb:opera cruft. To do this I would issue the command:

    cruft-remover cleanup deb:opera

    With the command cruft-remover will delete the cruft.

    To remove all cruft you would issue the command:

    cruft-remover cleanup --all

  • slide 4 of 4

    Final Thoughts

    Some times you simply don't know how much data is on your computer that you no longer need. Having the cruft-remover application available to keep this task simple is a boon for users and administrators with systems that have seen heavy use or have been around for a while. Use cruft-remover to keep your Linux pcs free from unused or unwanted applications and libraries.

Keeping Your Linux Machine Clean

If you have used a PC for any length of time you know that a hard drive can very quickly become cluttered with files, remains of uninstalled applications, and disorganized files and directories. In this Brighthub series you will learn the tools to keep your Linux system clean.
  1. Keep Your Linux Box Clean with These Tools
  2. Linux Command Line: cruft-remover
  3. Linux Command Line: history
  4. Linux Command Line: rm
  5. Linux Command Line: locate