This happened to me when my terminal unexpectedly closed my connection with vi open.
Thankfully I had no changes lost.
To remove that warning and discard the swap:
- Find the process id looking at
process ID: 2251 (still running)
, in this case it's 2251 - Verify you got the right id
ps 2251
- Kill the process using
kill 2251
And that's it.
Remember swap files are there to protect you, and you should not disable them completely.