Is it possible to delete an apex class or apex trigger using Metadata API? Please guide. I tried using https://github.com/financialforcedev/apex-mdapi but it did not work.
That API might not allow it, but certainly you can delete files from the server using the metadata api, the deploy call, and a destructive changes file.
In terms of doing it from Apex, you can do it from the metadata api (though this would be the more complex way) or the partner api. Based on your other comments, it seems like you are talking about doing this in the context of a visualforce page, in which case I would recommend just using the ajax toolkit and the
You should be able to use 'Tooling API' instead. Please have a look at this documentation