Apex code can’t be modified directly within a Production organization, so it requires steps using Developer tools, like the Force.com IDE.
Steps to Remove or Disable Apex Classes/Triggers
1. Force.com IDE should be installed.
2. Connect to the Production Instance using the IDE and find the class or trigger that you want to delete.
3. Open the matching .xml file, and change the Status XML tag from Active to Deleted.
4. Or to disable the trigger change it to Inactive.
Note: Apex class Status can only be changed to “Active” or “Deleted,” not “Inactive”.
5. Save the file.
6. Select the two files (Code and XML) using “Ctrl-click,” and then right-click on one of them.
7. Select Force.com | Save to server. (To delete in connected org.)
To delete in another org
8.Select Force.com | Deploy to server.
9. Provide your credentials for the destination org and follow the steps.
Senior Salesforce Architect
Connect me on LinkedIn
Follow me on Twitter @apexcoder
Subscribe to my blog https://apexcoder.com
Email me firstname.lastname@example.org