How to remove the source code for triggers, procedures and views?
You can do it by setting the RDB$...SOURCE column to NULL. Database will keep working as the compiled source is kept in BLR column. Here are the statements that remove the code (and also make sure they only do it for user objects - not to damage the system ones):
UPDATE RDB$TRIGGERS SET RDB$TRIGGER_SOURCE = NULL
WHERE RDB$SYSTEM_FLAG IS NULL OR RDB$SYSTEM_FLAG=0;
UPDATE RDB$PROCEDURES SET RDB$PROCEDURE_SOURCE = NULL
WHERE RDB$SYSTEM_FLAG IS NULL OR RDB$SYSTEM_FLAG=0;
UPDATE RDB$RELATIONS SET RDB$VIEW_SOURCE = NULL
WHERE (RDB$SYSTEM_FLAG IS NULL OR RDB$SYSTEM_FLAG=0)
AND RDB$VIEW_BLR IS NOT NULL;
If your aim is to protect your metadata from users, take a look at FAQ #32 as well.