~paul-mcspadden/computer-janitor/bug-726616

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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
.\" Copyright (C) 2008, 2009, 2010  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 2010-03-17 Ubuntu "Ubuntu system administration"
.SH NAME
computer-janitor \- clean up a system installation
.SH SYNOPSIS
.B "computer-janitor"
.RB [ --version|-h ]
.br
.B "computer-janitor find"
.RB [ -i|-r|-s|-v|-h ]
.RI
.br
.B "computer-janitor clean"
.RB [ -a|-v|-h ]
.RI [ CRUFT ]...
.br
.B "computer-janitor ignore"
.RB [ -h ]
.RI CRUFT
.br
.B "computer-janitor unignore"
.RB [ -h ]
.RI CRUFT
.br
.B computer-janitor-gtk
.SH DESCRIPTION
.B computer-janitor
and
.B computer-janitor-gtk
find and remove
.I cruft
from your system.
The former 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 originally installed because something else depended on
them, but the depending package has since been removed.  
Typically this includes large numbers of libraries.
.IP \(bu
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.
.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 such as
the
.B relatime
option.
.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 its state:
.I ignored
or
.IR removable .
.IP \(bu
.B 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
.B find
that is marked
.IR removable ,
use the
.B --all
option.
.IP \(bu
.B ignore
and
.B unignore
mark cruft as
.I ignored
or 
.IR removable ,
respectively.
.SH OPTIONS
Each subcommand listed above has its own set of options.  If
.B computer-janitor
is invoked with no subcommand, the following options are available:
.TP
.B --version
Print the version number and exit.
.TP
.BR --help | -h
Print some global help and exit.
.PP
The
.B find
subcommand supports the following options:
.TP
.BR --ignored | -i
Find and display only the system's ignored cruft.
.TP
.BR --removable | -r
Find and display only the system's removable cruft.
.TP
.BR --short | -s
Display only the cruft names; do not use with
.BR --verbose .
.TP
.BR --verbose | -v
Display a detailed explanation for each piece of cruft found.
.TP
.BR --help | -h
Print detailed help for the
.B find
subcommand and exit.
.PP
The
.B clean
subcommand requires either a cruft name or the
.B --all
option to specify which cruft to remove.  It supports the following options:
.TP
.B --all | -a
Remove all system cruft that are not ignored.
.TP
.BR --verbose | -v
Provide more details about the cruft being cleaned up.
.TP
.BR --help | -h
Print detailed help for the
.B clean
subcommand and exit.
.PP
The
.B ignore
and
.B unignore
commands both take the name of a cruft to mark ignored or removable,
respectively.  They both also accept these options:
.TP
.BR --help | -h
Print detailed help for the
.B ignore
or
.B unignore
subcommands and exit.
.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 FILES
.TP
.B /var/lib/computer-janitor/state.dat
This file stores the
.I ignored
or
.I removable
state of system cruft.  Any cruft not listed in this file is by default
.IR removable .
.TP
.B /etc/computer-janitor.d
This directory contains whitelist files, which specify
things that are never considered cruft.
A whitelist file has a name that ends with
.BR .whitelist ,
and contains one (potential) cruft name 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 clean hello
.RE
.PP
To mark a piece of cruft as 
.IR ignored ,
so that it isn't removed by
.B clean
.BR --all :
.sp 1
.RS
computer-janitor ignore hello
.RE
.PP
To mark a piece of cruft as
.I removable
again:
.sp 1
.RS
computer-janitor unignore hello
.RE
.PP
To remove all cruft that isn't ignored:
.sp 1
.RS
computer-janitor clean --all
.RE
.SH "SEE ALSO"
.BR computer-janitor-gtk (8).