Remove unnecessary libraries.