Deleting Products in Se2Agri


#1

Hello,

I’m planning to delete some products in my /mnt/archive/{site} folder.
If I delete those products, will it be also removed from the web interface’ products tab?

Much thanks,
Brent


#2

Hi,

You’ll also need to remove them from the database, with something like:

sudo -u postgres psql sen2agri
delete
from product
where name in
    ('S2A_OPER_PRD_MSIL2A_PDMC_20160702T062434_R051_V20160630T105625_20160630T105625.SAFE',
     'LC81980512016154LGN00_L2A',
     'LC81690812017065LGN00_L2A');

#3

It would be great to have such a “delete” option via the GUI.

For example, if one tries out several parameter settings to generate a L4B product, it would be handy to delete the tries.

Another option my be to include it in the delete_site.py, so one could delete all L4B products in one go for a specific site

Regards
Oliver


#4

That’s a legitimate feature request. But if you don’t mind writing SQL, you can delete the L4B products like this:

delete
from product
where site_id = ... and product_type_id = 6;

To see the available sites and product types you can use:

select id, name from site;
select id, name from product_type;

#5

Thanks. UsingSQL is fine. It was more a feature request. Where should one put such a request by the way?


#7

Here is fine, I suppose, although I can’t promise that it will get implemented.