Flutter “waiting for another flutter command”: clear the stale lock
Confirm no flutter process is running, then delete the stale lockfile in the SDK cache.
If no flutter command is actually running, delete the stale lock: rm <flutter-sdk>/bin/cache/lockfile, then re-run. Check for stray dart/flutter processes first — never remove the lock while a real command holds it.
Try these fixes in order
Check for a real running command
If a dart or flutter process is alive, let it finish or stop it cleanly; the lock is legitimate.
ps aux | grep -E "flutter|dart" | grep -v grepDelete the stale lockfile
The tool creates this file at startup and removes it on exit. A leftover file from a crashed command blocks every later command.
rm ~/development/flutter/bin/cache/lockfileRe-run your command
With the stale lock gone, the command acquires the lock fresh and proceeds.
flutter doctorInterpret what you see
You ran two flutter commands in parallel
What it suggests: The message is normal when two flutter commands run at once; the second waits for the first to finish.
Next check: Wait for the first command to finish instead of deleting anything.
The message persists for minutes with no visible activity
What it suggests: A killed terminal or crashed command left the lockfile behind with no process holding it.
Next check: Verify no dart or flutter processes are running, then delete the lockfile.
Every flutter command hangs on the same message
What it suggests: The lockfile lives inside the SDK at bin/cache/lockfile; its presence is what the tool is waiting on.
Next check: Remove that single file and re-run the command.
Why this happens
- A previous flutter command was killed or crashed while holding the tool's startup lock.
- A stale lockfile was left behind at <flutter-sdk>/bin/cache/lockfile.
Still not working?
Do not delete the lockfile while another flutter command is genuinely still running; that can corrupt the SDK cache. Check for running dart/flutter processes first and only remove the file when none are active.
Official sources
These steps are based on the linked documentation and general diagnostics. BugMedic has not independently tested every product and system configuration. Review commands before running them.