~ubuntu-branches/ubuntu/maverick/computer-janitor/maverick-updates

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
.\" Copyright (C) 2008, 2009  Canonical, Ltd.
.\"
.\" This program is free software: you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation, version 3 of the License.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program.  If not, see <http://www.gnu.org/licenses/>.
.TH COMPUTER-JANITOR 8 2008-07-25 Ubuntu "Ubuntu system administration"
.SH NAME
computer-janitor \- clean up a system installation
.SH SYNOPSIS
.B "computer-janitor find"
.br
.B "computer-janitor cleanup"
.RB [ --all ]
.RI [ CRUFT ]...
.br
.B "computer-janitor ignore"
.RI [ CRUFT ]...
.br
.B "computer-janitor unignore"
.br
.B computer-janitor-gtk
.RI [ options ]
.RI [ CRUFT ]...
.SH DESCRIPTION
.B computer-janitor
and
.B computer-janitor-gtk
find and remove
.I cruft
from your system.
The first one is a command line program, 
the latter has a graphical user interface.
.PP
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:
.IP \(bu
Packages that were installed because something else depended on them,
but now nothing depends on them anymore.
Typically this includes large numbers of libraries.
.IP \(bu
Packages that are no longer supported by the current release of the
operating system.
This can, for example, be applications whose development have stopped
and that have no support, including no security support, anymore.
Keeping such applications installed can be dangerous.
.IP \(bu
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:
the
.B relatime
option is an example.
.PP
.B computer-janitor
has four modes of operation, invoked by the first non-option
word in the argument list.
.IP \(bu
.B find
searches for cruft and prints out a list of them.
Each piece of cruft is also tagged with it's state:
.I ignored
or
.IR removable .
.IP \(bu
.B cleanup
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
.B find
that is marked
.IR removable ,
you need to use the
.B --all
option.
.IP \(bu
.B ignore
and
.B unignore
mark cruft as
.I ignored
or 
.IR removable ,
respectively.
.SH OPTIONS
.TP
.B --all
With the 
.B cleanup
operation,
remove all pieces of cruft that are not ignored.
.TP
.BR --state-file =\fIFILE
Use
.I FILE
as the name of the state file, for persistent storage of the state
.RI ( ignored 
or 
.IR removable )
of each piece of cruft.
Default is
.BR /var/lib/computer-janitor/state.dat .
Use
.B /dev/null
to disable persistent storage of state.
.TP
.BR --no-act
Don't actually remove anything, just pretend to do so.
This is useful for testing stuff.
.TP
.BR --verbose
Be verbose:
cause
.B find
to write a description of each piece of cruft it finds, to help the user
understand why understand why the cruft is cruft.
.SH "EXIT STATUS"
.B 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.
.SH ENVIRONMENT
.TP
.B COMPUTER_JANITOR_DEBUG
Set this to 
.B yes
to set the logging level to 
.I DEBUG
rather than
.IR INFO .
.TP
.B COMPUTER_JANITOR_PLUGINS
Set this to the directory in which 
.B computer-janitor
should look for plugins.
The default is to look for them in
.IR /usr/share/computer-janitor/plugins .
.SH FILES
.TP
.B /var/lib/computer-janitor/state.dat
This file stores the state of cruft:
.I ignored
or
.IR removable .
It only stores the state of cruft that have been state manipulated.
The state of cruft not mentioned in this file is
.IR removable .
.TP
.B /etc/computer-janitor.d
This directory contains whitelist files, which specify that certain
things are never cruft.
A whitelist file has a name that ends with
.BR .whitelist ,
and contains one name of cruft per line.
(Empty lines and lines beginning with # are ignored.)
.SH EXAMPLE
To find all cruft on the system:
.sp 1
.RS
computer-janitor find
.RE
.PP
To remove a specific piece of cruft:
.sp 1
.RS
computer-janitor cleanup hello
.RE
.PP
To mark a piece of cruft as 
.IR ignored ,
so that it isn't removed by
.BR cleanup :
.sp 1
.RS
computer-janitor ignore hello
.RE
.PP
To remove the 
.I ignored
status:
.sp 1
.RS
computer-janitor unignore hello
.RE
.PP
To remove all cruft that isn't ignored:
.sp 1
.RS
computer-janitor cleanup --all
.RE
.SH "SEE ALSO"
.BR computer-janitor-gtk (8).