RPMUSAGE(1)

πŸ“¦
version 1.19 Β· 2 versions
, in fedora 43

πŸ’– 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-cache to 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-time is 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-time is 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 example lilo or grub are 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 match whois, 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 πŸ”₯

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.


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