summaryrefslogtreecommitdiff
path: root/rpmorphan.1
blob: 9a08e5c68aab55983bd56b4b5c2483b5f03ea50e (plain)
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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.el \{\
.    de IX
..
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "RPMORPHAN 1"
.TH RPMORPHAN 1 "2012-08-01" "perl v5.14.2" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
rpmorphan \- find orphaned packages
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
rpmorphan finds \*(L"orphaned\*(R" packages on your system. It determines which packages have no other 
packages depending on their installation, and shows you a list of these packages. 
It is clone of deborphan debian software for rpm packages.
.PP
It will try to help you to remove unused packages, for exemple :
.PP
\&\- after a distribution upgrade
.PP
\&\- when you want to suppress packages after some tests
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
rpmorphan  [options] [targets]
.PP
or
.PP
grpmorphan  [options] [targets]
.PP
using grpmorphan is a short way to use \*(L"rpmorphan \-gui\*(R"
.PP
options:
.PP
.Vb 3
\&   \-help                brief help message
\&   \-man                 full documentation
\&   \-V, \-\-version        print version
\&
\&   \-verbose             verbose
\&   \-dry\-run             simulate package remove
\&   \-fullalgo            force full algorythm
\&   \-suggests            use suggested package as if required
\&   \-use\-cache           use cache to avoid rpm query
\&   \-clear\-cache         remove cache file
\&   \-gui                 display the graphical interface
\&   \-tk                  display the tk graphical interface
\&   \-curses              display the curses graphical interface
\&
\&   \-exclude pac         exclude pac from results
\&   \-install\-time +/\-d   apply on packages which are installed before (after) d days
\&   \-access\-time d       apply on packages which are not been accessed for d days (slow)
.Ve
.PP
targets:
.PP
.Vb 10
\&   \-package pac         search if pac is an orphan package
\&   \-all                 apply on all packages
\&   \-guess\-perl          apply on perl packages
\&   \-guess\-python        apply on python packages
\&   \-guess\-pike          apply on pike packages
\&   \-guess\-ruby          apply on ruby packages
\&   \-guess\-common        apply on common packages
\&   \-guess\-data          apply on data packages
\&   \-guess\-doc           apply on documentation packages
\&   \-guess\-dev           apply on development packages
\&   \-guess\-lib           apply on library packages (this is the default target if none is specified)
\&   \-guess\-all           apply all \-guess\-* options (perl, python ...)
\&   \-guess\-custom regex  apply the given regex to filter to package\*(Aqs names to filter the output
.Ve
.PP
keep file management
.PP
.Vb 5
\&   \-keep\-file file      define the keep file to be used
\&   \-list\-keep           list permanent exclude list
\&   \-zero\-keep           empty permanent exclude list
\&   \-add\-keep pac        add pac package to permanent exclude list
\&   \-del\-keep pac        remove pac package from permanent exclude list
.Ve
.SH "REQUIRED ARGUMENTS"
.IX Header "REQUIRED ARGUMENTS"
you should provide at least one target. this can be
.IP "\fB\-all\fR" 8
.IX Item "-all"
all the installed rpm package
.IP "\fB\-package\fR" 8
.IX Item "-package"
one or several explicit package
.IP "\fB\-guess\-*\fR" 8
.IX Item "-guess-*"
pre-selected packages groups
.IP "\fB\-guess\-custom\fR" 8
.IX Item "-guess-custom"
give a filter to select the packages you want study. you can use regular expressions.
.SH "OPTIONS"
.IX Header "OPTIONS"
.IP "\fB\-help\fR" 8
.IX Item "-help"
Print a brief help message and exits.
.IP "\fB\-man\fR" 8
.IX Item "-man"
Print the manual page and exits.
.IP "\fB\-version\fR" 8
.IX Item "-version"
Print the program release and exit.
.IP "\fB\-verbose\fR" 8
.IX Item "-verbose"
The program works and print debugging messages.
.IP "\fB\-dry\-run\fR" 8
.IX Item "-dry-run"
this is a simulation mode : rpmorphan will show you what is
the result of package removing. The window's title is modified
to show this mode.
.IP "\fB\-use\-cache\fR" 8
.IX Item "-use-cache"
the rpm query may be long (10 to 30 s). If you will run an rpmorphan tool
several time, this option will allow to gain a lot of time :
it save the rpm query on a file cache (first call), then
use this cache instead quering rpm (others calls).
.IP "\fB\-clear\-cache\fR" 8
.IX Item "-clear-cache"
to remove cache file. Can be used with \-use\-cache to write
a new cache.
.IP "\fB\-gui\fR" 8
.IX Item "-gui"
display a graphical interface which allow to show informations, remove packages
(an internal help is provided). This is currently the same as the \-tk option
.IP "\fB\-tk\fR" 8
.IX Item "-tk"
display a tk graphical interface which allow to show informations, remove packages
(an internal help is provided). The Tk perl module is necessary to run the gui.
.IP "\fB\-curses\fR" 8
.IX Item "-curses"
display a curses graphical interface which allow to show informations, remove packages
(an internal help is provided). The Curses::UI perl module is necessary to run the gui.
.IP "\fB\-exclude\fR" 8
.IX Item "-exclude"
this option will specify the packages to exclude from the output.
Can be used as '\-\-exclude pac1 \-\-exclude pac2'
or '\-\-exclude \*(L"pac1, pac2\*(R"'
.IP "\fB\-install\-time\fR" 8
.IX Item "-install-time"
install-time is a filter on the period from the package installation date to now (in days).
if set positive, it only allow packages installed before x days.
if set negative, it only allow packages installed since x days.
.IP "\fB\-access\-time\fR" 8
.IX Item "-access-time"
access-time is designed to filter packages which have not been used since x days.
.Sp
be careful : this option will slow the program
.IP "\fB\-fullalgo\fR" 8
.IX Item "-fullalgo"
for a small list of packages, rpmorphan use a different quicker methode : rpm \-e \-\-test
.Sp
this option can be used to force the use of the full algo
.IP "\fB\-suggests\fR" 8
.IX Item "-suggests"
some rpm version offers a meta-data dependency call suggests : it is
for usefull but not necessary packages. if this option is set, the
suggested packages are used in rpmorphan as required packages.
The default value for this option is unset.
.IP "\fB\-package\fR" 8
.IX Item "-package"
search if the given package(s) is(are) orphaned.
Can be used as '\-\-package pac1 \-\-package pac2'
or '\-\-package \*(L"pac1, pac2\*(R"'
.IP "\fB\-all\fR" 8
.IX Item "-all"
apply on all installed packages. The output should be interpreted.
For example lilo or grub are orphaned packages, but are necessary
to boot ...
.Sp
the \*(L"\-install\-time\*(R" and \*(L"\-access\-time\*(R" options may be useful to filter the list
.IP "\fB\-guess\-perl\fR" 8
.IX Item "-guess-perl"
This option tries to find perl modules. It tries to match \*(L"^perl\*(R"
.IP "\fB\-guess\-python\fR" 8
.IX Item "-guess-python"
This option tries to find python modules. It tries to match \*(L"^python\*(R"
.IP "\fB\-guess\-pike\fR" 8
.IX Item "-guess-pike"
This option tries to find pike modules. It tries to match \*(L"^pike\*(R"
.IP "\fB\-guess\-ruby\fR" 8
.IX Item "-guess-ruby"
This option tries to find ruby modules. It tries to match \*(L"^ruby\*(R"
.IP "\fB\-guess\-common\fR" 8
.IX Item "-guess-common"
This option tries to find common packages. It tries to match \*(L"\-common$\*(R"
.IP "\fB\-guess\-data\fR" 8
.IX Item "-guess-data"
This option tries to find data packages. It tries to match \*(L"\-data$\*(R"
.IP "\fB\-guess\-doc\fR" 8
.IX Item "-guess-doc"
This option tries to find documentation packages. It tries to match \*(L"\-doc$\*(R"
.IP "\fB\-guess\-data\fR" 8
.IX Item "-guess-data"
This option tries to find data packages. It tries to match \*(L"\-data$\*(R"
.IP "\fB\-guess\-dev\fR" 8
.IX Item "-guess-dev"
This option tries to find development packages. It tries to match \*(L"\-devel$\*(R"
.IP "\fB\-guess\-lib\fR" 8
.IX Item "-guess-lib"
This option tries to find library packages. It tries to match \*(L"^lib\*(R"
.IP "\fB\-guess\-all\fR" 8
.IX Item "-guess-all"
This is a short to tell : Try all of the above (perl, python ...)
.IP "\fB\-guess\-custom\fR" 8
.IX Item "-guess-custom"
this will allow you to specify your own filter. for exemple \*(L"^wh\*(R" 
will match whois, whatsnewfm ...
.IP "\fB\-keep\-file\fR" 8
.IX Item "-keep-file"
define the keep file to be used. If not set, the /var/lib/rpmorphan/keep will be used
.IP "\fB\-list\-keep\fR" 8
.IX Item "-list-keep"
list the permanent list of excluded packages and exit.
.IP "\fB\-zero\-keep\fR" 8
.IX Item "-zero-keep"
empty the permanent list of excluded packages and exit.
.IP "\fB\-add\-keep\fR" 8
.IX Item "-add-keep"
add package(s) to the permanent list of excluded packages and exit.
.Sp
Can be used as '\-\-add\-keep pac1 \-\-add\-keep pac2'
or '\-\-add\-keep \*(L"pac1, pac2\*(R"'
.IP "\fB\-del\-keep\fR" 8
.IX Item "-del-keep"
remove package(s) from the permanent list of excluded packages and exit.
.Sp
Can be used as '\-\-add\-keep pac1 \-\-add\-keep pac2'
or '\-\-add\-keep \*(L"pac1, pac2\*(R"'
.SH "USAGE"
.IX Header "USAGE"
rpmorphan can be useful after a distribution upgrade, to remove packages forgotten
by the upgrade tool. It is interesting to use the options "\-all \-install\-time +xx'.
.PP
If you want to remove some recent tested packages, my advice is "\-all \-install\-time \-xx'.
.PP
if you just want to clean your disk, use '\-all \-access\-time xxx'
.SH "FILES"
.IX Header "FILES"
/var/lib/rpmorphan/keep : the permanent exclude list
.PP
/tmp/rpmorphan.cache : cache file to store rpm query. The cache
file is common to all rpmorphan tools
.PP
/var/log/rpmorphan.log : log of all deleted packages
.SH "CONFIGURATION"
.IX Header "CONFIGURATION"
the program can read rcfile if some exists.
it will load in order
.PP
/etc/rpmorphanrc
.PP
~/.rpmorphanrc
.PP
\&.rpmorphanrc
.PP
In this file,
.PP
# are comments,
.PP
and parameters are stored in the following format :
parameter = value
.PP
example :
.PP
all = 1
.PP
curses = 1
.SH "DEPENDENCIES"
.IX Header "DEPENDENCIES"
rpmorphan uses standard perl module in console mode.
.PP
If you want to use the Tk graphical interface, you should install the Tk module 
(perl-Tk rpm package).
.PP
If you want to use the curses interface, you should install the Curses::UI perl module 
( perl-Curses-UI rpm package).
.PP
If you want to speed up rpmorphan, you should install the \s-1RPM2\s0 perl module ( perl\-RPM2 rpm package).
On mandriva, the \s-1URPM\s0 perl module (dependency from urpmi) will be used instead.
.SH "EXAMPLES"
.IX Header "EXAMPLES"
.IP "display orphaned libraries" 8
.IX Item "display orphaned libraries"
rpmorphan
.IP "display all orphaned packages in a curses interface" 8
.IX Item "display all orphaned packages in a curses interface"
rpmorphan \-\-all \-\-curses
.IP "display orphaned packages, not used since one year" 8
.IX Item "display orphaned packages, not used since one year"
rpmorphan \-\-all \-access\-time +365
.IP "display all orphaned packages, installed in the last 10 days" 8
.IX Item "display all orphaned packages, installed in the last 10 days"
rpmorphan \-\-all \-install\-time \-10
.IP "display all orphaned packages, installed one month ago (or more)" 8
.IX Item "display all orphaned packages, installed one month ago (or more)"
rpmorphan \-\-all \-install\-time +30
.SH "BUGS AND LIMITATIONS"
.IX Header "BUGS AND LIMITATIONS"
Virtuals packages are not well (for now) taken in account. 
Let's see an example : lilo and grub provide 'bootloader' virtual, which is 
necessary for system boot.
if the 2 are installed, they will be shown all 2 as orphans (but you can not remove 
the 2).
If you remove one of them, the other is now longer shown as orphan.
.PP
the software can only work with one version of each software : 
we only treat the first version seen
.SH "INCOMPATIBILITIES"
.IX Header "INCOMPATIBILITIES"
not known
.SH "DIAGNOSTICS"
.IX Header "DIAGNOSTICS"
to be written
.SH "NOTES"
.IX Header "NOTES"
this program can be used as \*(L"normal\*(R" user to show orphans,
but you need to run it as supersuser (root) to remove packages
or apply changes in the permanent exclude list
.PP
access-time and install-time options are \*(L"new\*(R" features, not available
in deborphan tool
.PP
For Fedora users :
Yum offers a program called 'package\-cleanup' which,
called with the '\-\-leaves' option, can show quickly a list of
unused library packages.
.PP
For Mandriva users :
the 'urpme \-\-auto\-orphans' command show quickly a a list of
unused library packages.
.SH "ENVIRONMENT"
.IX Header "ENVIRONMENT"
.IP "\s-1RPMORPHAN_METHOD\s0" 8
.IX Item "RPMORPHAN_METHOD"
for experts only : allow to force the method used to get rpm 
data. It can be set to \s-1URPM\s0, \s-1RPM2\s0 or 'basic' (for external rpm query)
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\fIrpm\fR\|(1) for rpm call
.PP
\fIrpmusage\fR\|(1)
.PP
\fIrpmdep\fR\|(1)
.PP
\fIrpmduplicates\fR\|(1)
.PP
\fIrpmextra\fR\|(1)
.SH "EXIT STATUS"
.IX Header "EXIT STATUS"
should be allways 0
.SH "LICENSE AND COPYRIGHT"
.IX Header "LICENSE AND COPYRIGHT"
Copyright (C) 2006 by Eric Gerbier
This program is free software; you can redistribute it and/or modify
it under the terms of the \s-1GNU\s0 General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.SH "AUTHOR"
.IX Header "AUTHOR"
Eric Gerbier
.PP
you can report any bug or suggest to gerbier@users.sourceforge.net