You can delete import statements for all unused packages within a file. Press (Code | Optimize Imports) or (when the caret is at the import statement), and then select Optimize Imports.