2.6.5.admintools:joomla:obsoletefiles

2.6.5.admintools:joomla:obsoletefiles

Runs the Obsolete Core Files feature: it removes the Joomla! files and folders which a Joomla update was supposed to delete, but did not. Leftover core files can break your site outright, most commonly with a fatal error about a class alias.

The command lists every obsolete file and folder it found on your site, and what happened to each of them. It exits with a non-zero status if any of them exist but could not be deleted.

Use the --dry-run option to find out what would be removed without removing anything. Instead of deleting, the command then reports whether PHP can write to each path. That is not quite the same question as whether it can be deleted — that depends on the permissions of the folder containing it — but it is a close enough approximation to be useful.

The output format is controlled with the --format option, as described above. Use joomla.php admintools:joomla:obsoletefiles --dry-run --format=json to get a machine readable list you can feed to another script.