If memory is an issue, traversing @INC may be your best option. Anyway, to answer the question - assuming you're dealing with Some::Module, you would simply delete $INC{'Some/Module.pm'} although you may also need to delete it from the overall symbol table: undef ${Some::Module::} - that last part is untested, and I'm sure someone will correct me with the right way to do that. If it's possible. Which is why I go back to traversing @INC as your most memory-conscious choice, although because you won't be compiling it, its mere presence, even if it doesn't compile, will give you a different answer (probably not important, but I like to keep all the risks, however small, on the table, in case they are not small to you).