Tidy RPM Cache script icon

Tidy RPM Cache script For Linux

  n/a
GPL v3    

Deleting Obsolete RPM Files from the cache. #Delete obsolete RPM  #System administration  #Software distribution  #Clean  #Delete  #Obsolete  

Description

changelog

Free Download

Tidy RPM Cache script (previously Delete Obsolete RPMS) is a script that can used to deleting obsolete RPM files from a directory.

The Python script included on this page deletes obsolete RPM package files from the package manager's cache. RPM is a software management system used on many Linux distributions including Fedora. This script may be useful if you wish to minimise the disk space requirement of locally stored update packages.

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}

This script deletes obsolete files by comparing the version information of all RPM package files which provide the same software package. You can specify any number of paths of directories to search and you can also exclude specific packages from being tested for obsolescence.

To run this script simply specify the path of a directory containing RPM package files using the --dir option. For example, to delete obsolete RPMs from the directory '/tmp/packages', execute the following command:

tidy-rpm-cache.py --dir=/tmp/packages

The script will display a list of RPM packages it has deemed as obsolete and ask for confirmation before deleting them from the filesystem. To disable the confirmation message, add the --force option.

You can also configure the script to keep a specific number of obsolete versions of a package. For example, if you wish to keep one obsolete version of each package in case the newest version causes problems, you can achieve this using the following command:

tidy-rpm-cache.py --dir=/tmp/packages --num-obsolete=1

Note that the --num-obsolete option specifies the number of versions to keep excluding the newest version of the package. In this case all but the newest and the second newest versions would be deleted.

To prevent the deletion of specific packages you can supply a regular expression which will be tested against all RPM package filenames. If the expression matches, then that RPM will be excluded from the obsolescence test. For example, to exclude all kernel packages, execute the following command:

tidy-rpm-cache.py --dir=/tmp/packages --exclude='^kernel.*'

Note: always enclose the regular expressions in single quotes to prevent them being interpreted as a glob expression.

To see more information about what the script is doing and what packages it is examining, add the --verbose option. To disable all output except warning and error messages, add the --quiet option.

For more information on these and other options, please read the help information provided with the script. You can access this by adding the --help option. For example:

tidy-rpm-cache.py --help

The reason for writing this script was to provide a feature missing in the current implementation of YUM. YUM is an RPM-based software management system which provides an option to keep downloaded package files in a cache directory for later use. It does not however provide a feature to delete package files which have become obsolete because a newer version of the same package has been downloaded. The following command could be executed manually or from a cron script to clean the default cache directory on Fedora Linux systems:

tidy-rpm-cache.py --dir=/var/cache/yum --force

Fedora 9 python 2.5.1-25 rpm-python 4.4.2.3-2

System requirements

What's new in Tidy RPM Cache script 1160:

  • The script has been renamed from 'rm_obsolete_rpms.py' to 'tidy-rpm-cache.py' to clarify its purpose and to distinguish from the functionality in RPM relating to obsolete package files.
Read the full changelog

Tidy RPM Cache script 1160

add to watchlist add to download basket send us an update REPORT
  runs on:
Linux
  filename:
tidy-rpm-cache.tar.gz
  1 screenshot:
Tidy RPM Cache script - Delete Obsolete RPMs script example
  main category:
System
  developer:
  visit homepage

ShareX 16.0.1

Capture your screen, create GIFs, and record videos through this versatile solution that includes various other amenities: an OCR scanner, image uploader, URL shortener, and much more
ShareX

Windows Sandbox Launcher 1.0.0

Set up the Windows Sandbox parameters to your specific requirements, with this dedicated launcher that features advanced parametrization
Windows Sandbox Launcher

Microsoft Teams 24060.3102.2733.5911 Home / 1.7.00.7956 Work

Effortlessly chat, collaborate on projects, and transfer files within a business-like environment by employing this Microsoft-vetted application
Microsoft Teams

Zoom Client 6.0.3.37634

The official desktop client for Zoom, the popular video conferencing and collaboration tool used by millions of people worldwide
Zoom Client

Bitdefender Antivirus Free 27.0.35.146

Feather-light and free antivirus solution from renowned developer that keeps the PC protected at all times from malware without requiring user configuration
Bitdefender Antivirus Free

7-Zip 23.01 / 24.04 Beta

An intuitive application with a very good compression ratio that can help you not only create and extract archives, but also test them for errors
7-Zip

IrfanView 4.67

With support for a long list of plugins, this minimalistic utility helps you view images, as well as edit and convert them using a built-in batch mode
IrfanView

Context Menu Manager 3.3.3.1

Customize Windows’ original right-click context menu using this free, portable and open-source utility meant to enhance your workflow
Context Menu Manager

4k Video Downloader 1.5.3.0080 Plus / 4.30.0.5655

Export your favorite YouTube videos and playlists with this intuitive, lightweight program, built to facilitate downloading clips from the popular website
4k Video Downloader

calibre 7.9.0

Effortlessly keep your e-book library thoroughly organized with the help of the numerous features offered by this efficient and capable manager
calibre

% discount
Context Menu Manager
  • Context Menu Manager
  • 4k Video Downloader
  • calibre
  • ShareX
  • Windows Sandbox Launcher
  • Microsoft Teams
  • Zoom Client
  • Bitdefender Antivirus Free
  • 7-Zip
  • IrfanView
essentials


Click to load comments
This enables Disqus, Inc. to process some of your data. Disqus privacy policy