EXT: Delete old files 

Classification

deletefiles

Version

main

Language

en

Description

Scheduler task for deleting old files and folder. Supports FAL.

Keywords

forAdmins, task, scheduler, auto, delete, files, clean

Copyright

2010-2026

Author

Felix Nagel

Email

info@felixnagel.com

License

This document is published under the Open Publication License available from http://www.opencontent.org/openpub/

Rendered

Wed, 22 Apr 2026 07:38:54 +0000

The content of this document is related to TYPO3, a GNU/GPL CMS/Framework available from www.typo3.org.

Table of Contents

Introduction 

What does it do? 

This extension helps to maintain your TYPO3 installation and / or to improve the privacy of your customers by deleting old files in specific intervals. It uses the scheduler delivered with TYPO3.

Note : This extension was tested carefully on multiple servers and TYPO3 installations and should work as expected. I would recommend to do some tests in your specific environment by using the $this->debugging variable.

Note : This extension will remove a file from FAL index but will NOT check if it's still in use!

Warning: This script is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Administration 

Just add a new scheduler task via scheduler module. You need to define the default values and the deletefiles specific ones:

Path

Define the path to clean. No ending slash. Please double check if its correct.

Regular expression for file and folder name

Define a regex filter for the base name of the file or folder (depending on the delete method) to be cleaned. Example: "/^form_/" will clean folders or files that start with "form_".

Minimum age

The minimum age of a file or a directory to be deleted by this extension. Checks for the last modified timestamp.

Delete Method

What to delete and how to check which files to delete. Please see “Delete Methods” section below.

Delete Methods 

Following deleting methods are available:

Chosen directory

This will only check if the chosen path is old enough and deletes it with all its content.

All old files

This will delete all old files within the chosen path. It will not check files within directories.

All old directories (checks first level only, deletes recursive)

This will delete old directories (including content) within the chosen path. It will check the timestamp of each directory but not its contents.

All old files and directories (checks first level only, deletes recursive)

Merge of “All old files” and “All old directories (checks first level only, deletes recursive)”. Deletes all old files and directories within the chosen path. Be aware this will only check last modified timestamp in first level (contents of a directory will not be tested).

All old files and directories (checks age of all files and directories recursive, ALPHA!)

This will check every single file and directory within the chosen path. It works recursive to make sure every single file, even in a deep folder structure, will be tested. Please note: this functionality is still alpha. Use with care and be aware this is a very performance hungry operation.

Note : This extension will remove a file from FAL index but will NOT check if it's still in use!

Upgrade Guide 

Update from 1.5.0 to 1.6.2 

Overview

  • TYPO3 14 LTS support
  • Remove TYPO3 13.x support

How to upgrade

  • Clear cache in Install Tool

Update from 1.4.0 to 1.5.0 

Overview

  • PHP 8.4 support
  • Regex filter for folder and filenames
  • Migrated docs to PHP rendering
  • Code clean-up

How to upgrade

  • Clear cache in Install Tool

Update from 1.3.0 to 1.4.0 

Overview

  • TYPO3 13 LTS support
  • PHP 8.3 support
  • Remove TYPO3 11.x and 12.x support

How to upgrade

  • Clear cache in Install Tool

Update from 1.2.2 to 1.3.0 

Overview

  • TYPO3 12 LTS support
  • PHP 8.2 support
  • Remove TYPO3 10.x support
  • Remove PHP 7.x support
  • Minor improvements and code clean up

How to upgrade

  • Clear cache in Install Tool

Update from 1.2.1 to 1.2.2 

Overview

  • Added PHP 8.1 support

Update from 1.2.0 to 1.2.1 

Overview

  • Removed PHP 7.0-7.3 support

Update from 1.1.1 to 1.2.0 

Overview

  • TYPO3 11.4 LTS support
  • PHP 8.0 support
  • Remove TYPO3 9.x support
  • Update localization files to XLF format
  • Minor improvements and code clean up

How to upgrade

  • Clear cache in Install Tool

Update from 1.1.0 to 1.1.1 

Overview

  • PHP 7.4 support

Update from 1.0.3 to 1.1.0 

Overview

  • TYPO3 10.4 LTS support
  • PHP 7.3 support
  • Remove TYPO3 8.x support
  • Minor improvements and code clean up
  • Improved documentation

How to upgrade

  • Clear cache in Install Tool

Update from 1.0.2 to 1.0.3 

Update:

Sorry, for not making version 1.0.3 a major release as it contained breaking changes.

Overview

  • TYPO3 9.x support
  • PHP 7.2 support
  • Remove TYPO3 6.x and 7.x support
  • Remove PHP < 7.0 support
  • Changed PHP namespace to FelixNagel
  • Switch to PSR-2 CGL

How to upgrade

  • Use "Clear all caches including PHP opcode cache" and "Dump Autoload Information" in the install tool (if needed for your setup)
  • Re-add all tasks in scheduler module

Update from 1.0.0 to 1.0.2 

Overview

  • TYPO3 8.x support
  • Rework and improve documentation

Update from 0.0.x to 1.0.0 

Overview

  • TYPO3 7.x support (tested up to TYPO3 7.6)
  • Refactoring (modern structure, PHP namespaces, etc.)
  • Exclude .htaccess and .htpasswd files
  • Remove deleted files from FAL index

How to upgrade

  • Clear cache in Install Tool
  • Re-add all tasks in scheduler module