Removing a file is done one of the two ways. First, make sure you have selected the file within the file tree which you wish to delete.
Right-click within the file tree
Select File -> Delete Item from the menu
Deleting is permanent and it cannot be undone later although you can use Code Playback to find the file, review how it was created and copy/paste into a new file you can create