RPMUSAGE(1)
π RPMUSAGE π
okay bestie, so rpmusage is a lil script from the User Contributed Perl Documentation corner of the universe, and it's here to tell you which rpm packages you literally never touch. yes, it's the "who's still living in my house rent-free" tool. π β¨
πΈ NAME πΈ
rpmusage β display rpm packages last use. that's it, that's the whole vibe. π
π¦ DESCRIPTION π¦
ok so here's the tea: rpmusage will display, for each package, the last date it was used (in days). use it to sniff out the unused packages lurking in your system like that one ex you forgot to block. π
it does this by peeking at the atime field of all of the package's files. cute, right? exceptβ
β οΈ note: because it literally scans all files inodes, the run may be long... like, go-make-a-snack long. π it's giving "I'll be back in a bit."
β¨ SYNOPSIS β¨
rpmusage.pl [options] [targets]
options:
-help brief help message
-man full documentation
-V, --version print version
-verbose verbose
-fullalgo force full algorythm
-use-cache use cache to avoid rpm query
-clear-cache remove cache file
-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)
targets:
-package pac search last access on pac package
-all apply on all packages (this is the default)
-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
-guess-all apply all -guess-* options (perl, python ...)
-guess-custom regex apply the given regex to filter to package's names to filter the output
π REQUIRED ARGUMENTS π
good news bestie: it can be used without any argument, and then it will just apply on all packages. no setup arc required, it's giving low-maintenance queen. π
π OPTIONS π
-helpβ prints a brief help message and then exits. stage left, no notes. π«Ά-manβ prints the manual page and exits. hi, that's me, you're reading me. π-versionβ prints the program release and exits. slay, short and sweet.-verboseβ the program works and prints debugging messages. it's yapping, but productively. π£οΈβ¨-use-cacheβ the rpm query may be long (like 10 to 30 s long, no cap). if you're gonna run an rpmorphan tool several times, this option lets you gain a lot of time: it saves the rpm query into a file cache on the first call, then uses that cache instead of querying rpm on the other calls. it's literally the "remember my order so I don't have to repeat myself" of flags. π§ πΎ-clear-cacheβ removes the cache file. can be used with-use-cacheto write a fresh new cache. out with the old, in with the new. π§Ή-excludeβ this option specifies the packages to exclude from the output. use it like'--exclude pac1 --exclude pac2'or like'--exclude "pac1, pac2"'. two ways, both valid, choose your fighter. π₯-install-timeβinstall-timeis a filter on the period from the package installation date to now, measured in days. if set positive, it only allows packages installed before x days. if set negative, it only allows packages installed since x days. pick a lane. π¦-access-timeβaccess-timeis designed to filter packages which have not been used since x days.
be careful: this option will slow the program down. bestie it was already slow. this makes it slower. proceed with awareness. ππ
-fullalgoβ for a small list of packages, rpmusage uses a different, quicker method:rpm -e --test. this option can be used to force the use of the full algo. sometimes you just want the thorough version, and honestly? respect. πͺ-packageβ searches if the given package(s) is(are) orphaned. use it like'--package pac1 --package pac2'or'--package "pac1, pac2"'. same energy as-exclude, opposite direction. π-allβ applies on all installed packages.
the output should be interpreted. for exampleliloorgrubare orphaned packages, but they are necessary to boot... so like, don't go deleting your bootloader because a script called it "unused," please, I'm begging. ππ
the "-install-time" and "-access-time" options may be useful to filter the list. use them. they're your friends. π«Ά
-guess-perlβ tries to find perl modules. it tries to match"^perl". πͺ-guess-pythonβ tries to find python modules. it tries to match"^python". π-guess-pikeβ tries to find pike modules. it tries to match"^pike". π£-guess-rubyβ tries to find ruby modules. it tries to match"^ruby". π-guess-commonβ tries to find common packages. it tries to match"-common$". π§©-guess-dataβ tries to find data packages. it tries to match"-data$". π-guess-docβ tries to find documentation packages. it tries to match"-doc$". π-guess-dataβ tries to find data packages. it tries to match"-data$". (yes bestie, it's listed twice in the original. I don't make the rules, I just report them faithfully. π the data packages really said "main character so nice I got listed twice.")-guess-devβ tries to find development packages. it tries to match"-devel$". π οΈ-guess-libβ tries to find library packages. it tries to match"^lib". π¦-guess-allβ this is a short way to tell it: try all of the above (perl, python ...). the "select all" button, essentially. β-guess-customβ this lets you specify your own filter. for example"^wh"will matchwhois,whatsnewfm... build-your-own-guess, iconic. π¨
π USAGE π
display all packages in access date order:
rpmusage.pl --all | sort -k 2 -n
only ask for perl packages:
rpmusage.pl --guess-perl | sort -k 2 -n
and to read the output, here's the decoder ring π: "python-pexpect 97 on /usr/share/doc/python-pexpect" means the package was last used 97 days ago and the more recently used file was the /usr/share/doc/python-pexpect file. so the number is the days-since-touch, and the path is the freshest file it found. periodt. π
π FILES π
/tmp/rpmorphan.cache: cache file to store rpm query. the cache file is common to all rpmorphan tools, so it's a shared group chat, not a private DM. π¬
π§ DEPENDENCIES π§
rpmusage uses only standard perl modules. lowkey minimalist, we love that for it. πΏ
but it does need the rpm command tool. so like, no rpm, no party. π
π BUGS AND LIMITATIONS π
the software can only work with one version of each software: we only treat the first version seen. so if you've got duplicates, only the first one gets a seat at the table. the rest are standing. πͺ
π CONFIGURATION π
the program can read an rcfile if some exists. it will load, in order:
/etc/rpmorphanrc~/.rpmorphanrc.rpmorphanrc
in this file:
#are comments
and parameters are stored in the following format: parameter = value
example:
all = 1
curses = 1
π INCOMPATIBILITIES π
not known. nothing to report, your honor. π«‘
π©Ί DIAGNOSTICS π©Ί
to be written. it's giving "I'll do it later" and honestly, same. ππ
β NOTES β
this program should be used as root superuser, because it needs to access (in read mode) all files. so yeah, sudo up, bestie. π
π₯ SEE ALSO π₯
rpm(1)for rpm callrpmorphan(1)rpmdep(1)rpmduplicates(1)rpmextra(1)
the whole friend group, honestly. go say hi. π
π EXIT STATUS π
should be allways 0. (spelled exactly like that in the original, and we respect it. π) chill, unbothered, zero drama exit codes.
π 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 GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
slay, open source royalty. ππ
π«Ά AUTHOR π«Ά
Eric Gerbier
you can report any bug or suggest to gerbier@users.sourceforge.net. be nice, they're doing great work. π
and that's a wrap bestie π this lil page came to you courtesy of perl v5.42.0, dated 2025-07-25 β the RPMUSAGE(1) manual, remixed with love, zero facts harmed, every flag intact. mwah. πβ¨π
π¦ where this page comes from
- fedora 43: rpmorphan 1.19-8.fc43 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms