Poster of Linux kernelThe best gift for a Linux geek


Section: Ubuntu system administration (8) Updated: 2011-02-16
Local index Up


computer-janitor - clean up a system installation  


computer-janitor [--version|-h]
computer-janitor find [-i|-r|-s|-v|-h]
computer-janitor clean [-a|-v|-h] [CRUFT]...
computer-janitor ignore [-h] CRUFT
computer-janitor unignore [-h] CRUFT


computer-janitor and computer-janitor-gtk find and remove cruft from your system. The former is a command line program, the latter has a graphical user interface.

Cruft is anything that shouldn't be on the system, but is. Stretching the definition, it is also things that should be on the system, but aren't. Examples:

Packages that were originally installed because something else depended on them, but the depending package has since been removed. Typically this includes large numbers of libraries.
Packages that are no longer supported by the current release of the operating system. For example, this can be applications whose development have stopped and that no longer have support, including for security issues. Keeping such applications installed can be dangerous.
Configuration tweaks that are missing from the system, but which would be there if the system was installed from scratch. For example, mount options for filesystems such as the relatime option.

computer-janitor has four modes of operation, invoked by the first non-option word in the argument list.

find searches for cruft and prints out a list of them. Each piece of cruft is also tagged with its state: ignored or removable.
clean actually removes the cruft. It will remove those pieces of cruft you name on the command line. If you want to remove everything identified by find that is marked removable, use the --all option.
ignore and unignore mark cruft as ignored or removable, respectively.


Each subcommand listed above has its own set of options. If computer-janitor is invoked with no subcommand, the following options are available:
Print the version number and exit.
Print some global help and exit.

The find subcommand supports the following options:

Find and display only the system's ignored cruft.
Find and display only the system's removable cruft.
Display only the cruft names; do not use with --verbose.
Display a detailed explanation for each piece of cruft found.
Print detailed help for the find subcommand and exit.

The clean subcommand requires either a cruft name or the --all option to specify which cruft to remove. It supports the following options:

--all | -a
Remove all system cruft that are not ignored.
Provide more details about the cruft being cleaned up.
Print detailed help for the clean subcommand and exit.

The ignore and unignore commands both take the name of a cruft to mark ignored or removable, respectively. They both also accept these options:

Print detailed help for the ignore or unignore subcommands and exit.


computer-janitor will return an exit code of 0 for successful operation (no errors). It will return a non-zero exit code if there are any errors. It is not an error to find cruft, or to not find cruft.  


This file stores the ignored or removable state of system cruft. Any cruft not listed in this file is by default removable.
This directory contains whitelist files, which specify things that are never considered cruft. A whitelist file has a name that ends with .whitelist, and contains one (potential) cruft name per line. (Empty lines and lines beginning with # are ignored.)


To find all cruft on the system:

computer-janitor find

To remove a specific piece of cruft:

computer-janitor clean hello

To mark a piece of cruft as ignored, so that it isn't removed by clean --all:

computer-janitor ignore hello

To mark a piece of cruft as removable again:

computer-janitor unignore hello

To remove all cruft that isn't ignored:

computer-janitor clean --all






This document was created by man2html, using the manual pages.
Time: 22:01:26 GMT, April 16, 2011