Hi
Publication data is a fixed copy of one moment. An edit or delete information in the work system doesn't have an effect on the publication. You need to think that a publication is a digital "printed" copy of your data. And public information is not changed directly with the changes done in the work space. To change the public data, you need to perform the publication process with your changes. Delete removes the record in the work space, but it can remain in the public space, as the same as a physical copy (as a printed book). Therefore, since the record is no longer present in the working system, the publishing process does not take it into account, in the same way that records can be removed from the publishing process by filtering by a criterion.
The result of removing a record is that you cannot remove it from public space if you don't perform a publication process of the record with "Public" state in Gray before deleting it.
As it can be strange for users (Some people can forget to unpublish the data before deleting it), the delete record behaviour was changed in version 6.2.8, therefore:
If you are working in version < 6.2.8, the process to delete and remove the record in the public space is:
- Set the "Public" button to "Grey" state.
- Publish the change.
- Delete the record.
If you are working in version >= 6.2.8 the public record will be delete if you have the "Delete diffusion records" active in the moment that you are deleting the record:

That is more comfortable in the whole process.
However, in cases where you have a deleted record in the working system that you want to remove from a public space (removing it from the public API), there are different ways to do this.
Using Time Machine.
You can recover the record in Time Machine of the section going to section Time Machine tool in the section list.

Then, changing the Public to "Grey" state and publishing the change, it will be removed from the public space and it will not accesible to the API.

Make sure the change has been made on your public website.
And then, you can delete it.
Deleting the record/s in MariaDB/MySQL directly
You can delete the record/s that you want accessing to the MariaDB/MySQL and deleting manually. As public data is a copy of your data, this action is safe, because you can publish your data again and again.
If you have a mix that you don't know what is right, what is wrong, and you want a refresh all your data, you can truncate or drop the table affected with something as:
For empty all data, but maintain the table.
TRUNCATE TABLE `the_table_to_be_empty`;
To drop the table:
DROP TABLE `the_table_to_be_deleted`;
If you want to remove specific record you can perform something as:
First, check if the record is the record that you want to delete, for example if you want to delete the record 4, you can perform a SELECT as:
SELECT * FROM `the_table_with_the_deleted_record`
WHERE `section_id` = '4';
Then, you can proceed to remove it using the same WHERE clause.
DELETE FROM `the_table_with_the_deleted_record`
WHERE `section_id` = '4';
I hope I have explained it clearly.
Best