delete from acs_objects where object_type='notes';
or similar, you can look the categories package or another like example. If you solve the bug send it to https://openacs.org/bugtracker/openacs/.
Regards