@typotony Sorry I’m late to the party.
I haven’t built a “helper” command yet for removing fog images, but I do have Get-FogImages
https://fogapi.readthedocs.io/en/latest/commands/Get-FogImages/
If you setup the fogapi powershell module, you can use that to get a list of the current images.
You can delete the records of the fog images from the database via
Remove-FogObject
i.e. this would delete ALL your images
$images = get-fogimages
$images | Foreach-object {
Remove-fogobject -type object -coreObject image -idofobject $_.data.id
}
That little snippet is untested but should be enough to get you started.
I’m pretty sure the api command won’t remove the files from the server though.
However, I believe the path to the files, or at least the relative path is in a child property of the data property when you run Get-FogImages.
So if you set this up to run on the linux based fog server using the powershell api module, you could script something that runs in a cronjob to delete from the database and then the files.
i.e. (again untested as I’m away from my test environment, so the property names are guesses, but it should point you in the right direction)
Get-FogImages | % {
if ($_.data.name -eq "removeMe") {
Remove-fogobject -type object -coreObject image -idofobject $_.data.id
rm -fr $_.data.path
}
}
This, if run on the fog server where you have configured the fogapi module (see my signature for doc links), would find images named “removeMe” and then delete them from the database and then the files from the server.