- Do one of the following:
- On the main menu, choose .
- Press Ctrl+Alt+OCtrl+Alt+O
In the Optimize Imports dialog box, specify where you want PhpStorm to remove unused import statements from.
- To have unused imports removed from the current file, select the File option.
- To have unused imports removed from all files in the current directory, select the All files in directory... option.
- Click Run.