aimanecouissi/module-system-config-file-cleanup

Delete old files from system configuration file fields

Maintainers

Package info

github.com/aimanecouissi/magento2-module-system-config-file-cleanup

Type:magento2-module

pkg:composer/aimanecouissi/module-system-config-file-cleanup

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-04-30 21:34 UTC

This package is auto-updated.

Last update: 2026-04-30 21:34:58 UTC


README

Latest Stable Version Total Downloads Magento Version License PHP Version Require

Deletes replaced or cleared media files from Stores → Configuration file fields. The module cleans up previously uploaded files when Magento system configuration file fields are saved with a replacement or empty value.

Installation

composer require aimanecouissi/module-system-config-file-cleanup
bin/magento module:enable AimaneCouissi_SystemConfigFileCleanup
bin/magento setup:upgrade
bin/magento cache:flush

Usage

When a Stores → Configuration file field backed by Magento\Config\Model\Config\Backend\File is saved with a replacement file or an empty value, the previously stored media file is deleted. Fields that keep the same file value leave the existing media file in place.

Uninstall

bin/magento module:disable AimaneCouissi_SystemConfigFileCleanup
composer remove aimanecouissi/module-system-config-file-cleanup
bin/magento setup:upgrade
bin/magento cache:flush

Changelog

See CHANGELOG for all recent changes.

License

MIT