How to remove unused imports & organize code in vs code editor
As a developer or programmer, organizing code and removing unused imports for optimization is very important. It’s a good practice for coding.


Md Kayesh
6 min readJune 11, 2024
You can use a keyboard shortcut to remove the unused imports in VS Code:
- on Windows and Linux, press Shift + Alt + O (the letter O, not zero).
- on macOS, press Shift + Option + O (the letter O, not zero).
# Using the Remove Unused Imports command
- Ctrl + Shift + P on Windows and Linux
- Command + Shift + P on macOS