Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals

Ubuntu, Linux, Unix vi error: swap file .swp already exists

Command that gave me error:
vi .env or vi <any file name that starts with a “.” that means it’s a hidden file>

Error:
Swap file .env.swp already exists
or
Swap file xxx already exists

Solution:
ls -A (This will show you if a .swp file really existd)
rm .filename.swp (This will delete the .swp file which was generated while you closed the session accidentally while editing the original file)

Verify the solution:
ls -A (Now you won’t see the .swp file that you deleted using the above command)

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.