After comments at https://github.com/OpenMage/magento-lts/issues/1475 i'll archive this in favor of https://github.com/fballiano/magento1-image-cleaner.
This estension lists all the product images that they find in the directory "media/catalog/product" and that they do not in the database. It allows to select and to erase these files
https://www.magentocommerce.com/magento-connect/image-clean.html
modman clone https://github.com/sreichel/magento-Defcon2-Imaclean.git
{
"require": {
"defcon2/imaclean": "*",
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/sreichel/magento-Defcon2-Imaclean.git"
}
]
}