Description
Tidy RPM Cache Script
Tidy RPM Cache script (previously known as Delete Obsolete RPMS) is a handy tool that helps you clean up old RPM files from your directories. It's pretty useful if you want to keep your system tidy and save some disk space!
What Does It Do?
This Python script can delete obsolete RPM package files from your package manager's cache. If you're using Linux distributions like Fedora, this script can really help minimize the disk space taken up by outdated update packages.
How to Use It
To get started, here's how you run the script:
rm_obsolete_rpms.py {-d|--dir=dir} {-n|--num-obsolete=number} {-x|--exclude=reg-ex} {-f|--force} {-s|--srpm} {-v|--verbose} {-q|--quiet} {--log-prefix=text} {-u|--usage} {-h|--help} {--version}
Deleting Old Files
The script checks the version info of all RPM files to find out which ones are outdated. You can tell it where to look and even exclude certain packages from being cleaned up.
Simple Commands
If you want to delete obsolete RPMs from a specific directory like '/tmp/packages', just use this command:
tidy-rpm-cache.py --dir=/tmp/packages
It'll give you a list of the old packages it found and ask if you're sure about deleting them. If you're ready to go without confirmation, just add the --force option!
Keep Some Versions
You can set it up to keep a certain number of older versions too! For example, if you want to keep one old version in case something goes wrong with the new one, use:
tidy-rpm-cache.py --dir=/tmp/packages --num-obsolete=1
Exclusions Made Easy
If there are specific packages you don't want to delete, use a regular expression for that. For instance, if you want to skip all kernel packages, run:
tidy-rpm-cache.py --dir=/tmp/packages --exclude='^kernel.*'
(Remember to put those regex patterns in single quotes!)
Status Updates and Help Options
If you're curious about what the script is doing or what it's checking, just add the --verbose option. And if things get too noisy, --quiet will silence most messages except for warnings and errors.
Your Go-To Cleanup Tool!
This script fills a gap left by YUM—an RPM-based software manager that keeps downloaded files but doesn't remove outdated ones. You could set up a cron job with this command for regular cleanups:
tidy-rpm-cache.py --dir=/var/cache/yum --force
If you're ready to try it out or need more details on how everything works, check out this Tidy RPM Cache Script.
User Reviews for Tidy RPM Cache script FOR LINUX 7
-
Tidy RPM Cache script is a handy tool for cleaning up obsolete RPM files, saving disk space. Easy to use with useful options.
-
This Tidy RPM Cache script is a lifesaver! It effortlessly cleans up obsolete RPMs and saves disk space.
-
I love how easy it is to use this script. It effectively removes old RPM files and keeps my system tidy!
-
Fantastic tool for managing RPM packages! The options are flexible, and it has really streamlined my workflow.
-
The Tidy RPM Cache script works flawlessly. I appreciate the confirmation prompt before deletion—great for safety!
-
Highly recommend this script! It's efficient, user-friendly, and helps me maintain a clean package directory.
-
A brilliant solution for cleaning up obsolete RPMs! The customizable options make it perfect for any user.