How do I delete an ISO file open in system?

What is an ISO file?

ISO files are disc image files that contain an exact copy of all data from a CD, DVD, Blu-ray disc, or other optical disc (Source). They allow you to archive an entire disc into a single .iso file. This makes it easy to store, share and write the contents of optical media like CDs without needing the physical disc.

ISO image files, which end with the .iso extension, are essentially snapshots of optical discs containing all folders, files, drive structure, and boot sector data. They can be mounted and accessed like real discs on modern operating systems. The format is standardized in the ISO 9660 specification. ISO files are useful for burning optical disc copies, creating bootable USB drives, and emulating disc content without physical media.

ISO Files in Use

When an ISO file is mounted, it behaves like an actual disc inserted into the computer. The contents of the ISO file become accessible like a regular drive, and Windows treats it as an inserted disc. This prevents the ISO file from being deleted while in use, similar to how you cannot eject a disc that is currently being accessed.

When trying to delete an in-use ISO file, Windows will display an error stating “This file is open in System”. This is because Windows has the ISO file mounted, so the system sees it as an inserted disc drive. With the ISO file mounted, Windows blocks attempts to delete the file, just as it would block deleting an actual CD or DVD that is currently inserted and being used.

To delete an ISO that is in use, you first need to unmount it so that Windows no longer treats it like an inserted disc. Once unmounted, Windows will release the lock on the file and allow it to be deleted like any other file. The steps to unmount an ISO file are covered in detail in the sections below.

Challenges deleting in-use ISO files

One of the most common issues when trying to delete an ISO file in Windows is getting an error message stating “Can’t delete ISO file open in system.” This occurs because the ISO file is currently mounted (opened) and in use by the operating system.

ISO disk image files contain an exact copy of a CD, DVD, or Blu-ray disc. Mounting an ISO essentially tricks your computer into thinking it’s reading content from an actual disc rather than a file. As long as the ISO file is mounted, Windows prevents you from deleting it to avoid potential data loss or corruption.

You’ll typically see errors like “This file is open in System” or “The source file is in use” when trying to delete an ISO that’s currently mounted. Unlike regular files, you cannot directly delete an ISO file while it’s mounted regardless of whether any programs are actively accessing it. The entire virtual drive must be unmounted first before the ISO can be removed.

This limitation applies not just in Windows File Explorer, but also when trying to delete ISOs using the Command Prompt or Powershell. Simply put, a mounted ISO is treated as an integral system resource rather than a regular file.

Unmount the ISO file

Before you can delete an ISO file that is currently in use, you need to unmount the virtual drive it is mounted on. This will close the ISO file and release it from the system.[1]

To unmount the ISO file in Windows:

  1. Open File Explorer and go to This PC or My Computer.
  2. Under Devices and Drives, locate the drive letter assigned to the mounted ISO file.
  3. Right-click on the drive and select Eject.

Selecting Eject will unmount the virtual drive, allowing you to delete the ISO file without issues. After ejecting, the drive letter will disappear from File Explorer.

Once unmounted, you can delete the ISO file itself like any other file on your system.

[1] “How to open (mount) or eject (unmount) ISO files in Windows 10.” https://www.digitalcitizen.life/mount-unmount-iso-file-explorer/

Delete via File Explorer

After unmounting, the ISO file can be deleted like a normal file in File Explorer. To do this:

  1. Open File Explorer and navigate to the folder where the ISO file is located.
  2. Right-click on the ISO file and select Delete.
  3. A confirmation dialog will appear. Click Yes to confirm the deletion.

The ISO file will be moved to the Recycle Bin. To permanently remove it, empty the Recycle Bin.

Deleting through File Explorer is quick and straightforward once the ISO is unmounted. Just be sure to first eject any virtual drive created from the ISO to avoid errors. With the ISO unmounted, it can be removed like any other file.

Delete via Command Prompt

You can use the Command Prompt to delete an ISO file that is in use and unable to be deleted through Windows Explorer. The Command Prompt gives you more control over file operations.

To delete an ISO file using the Command Prompt:

  1. Open the Command Prompt as an administrator. To do this, type “cmd” in the Windows search bar, right-click on the Command Prompt app result, and select “Run as administrator”.
  2. Navigate to the folder containing the ISO file you want to delete by using the cd command. For example, if your ISO file is located in the F:\ISO\ folder, type cd F:\ISO\ and press Enter.
  3. Type the command del filename.iso where “filename.iso” is the name of your ISO file, and press Enter. This will force delete the ISO file.

The del command stands for “delete” and the /f parameter forces the deletion. This approach overrides the file lock and deletes the in-use ISO file from your system.1

After using the del command, you should be able to confirm the ISO file no longer appears in File Explorer.

Delete via Disk Management

Another way to delete an in-use ISO file is through Disk Management in Windows. Here are the steps:

  1. Open Disk Management by right-clicking the Start menu and selecting “Disk Management”.
  2. In the list of drives, locate the drive letter assigned to the mounted ISO file. It will likely show as a CD/DVD drive.
  3. Right-click on the ISO drive letter and select “Delete Volume” to remove it.
  4. Click “Yes” to confirm the deletion.

This will dismount the ISO file and delete the virtual drive, allowing you to permanently remove the ISO file afterwards. Disk Management provides a straightforward way to eject the problematic ISO within Windows itself. Just be sure to verify you are deleting the correct drive letter belonging to the ISO.

Source: https://answers.microsoft.com/en-us/windows/forum/all/delete-an-iso-image-file/a7d78a05-70d0-45ad-9804-b501b54d0b2b

Use third-party tools

Specialized software like IsoBuster provides advanced options for deleting ISO files. These tools are designed to safely and securely erase ISO images so they can no longer be accessed or recovered. IsoBuster includes features like:

  • Secure erase – Overwrites ISO file data to make it unrecoverable
  • Erase ISO history – Clears traces of the ISO from your system
  • Force unmount – Releases any locks so the ISO can be deleted

Third-party ISO deletion utilities offer more control than using built-in Windows options. They ensure no remnants of the ISO file are left behind after deletion. However, these tools may require more technical expertise to use compared to basic delete operations.

Clear ISO history

After deleting an ISO file, it may still appear in your computer’s list of recent files or places. This is because Windows keeps a record of recently accessed files and folders to allow quick access in the future. Though the ISO is deleted, its reference remains in your system’s history.

To fully remove traces of an ISO file, you need to clear the record of recently accessed files. This removes the ISO entry from places like “Recent” in File Explorer or the Start menu. Doing this will prevent the deleted ISO from appearing in quick access locations.

Here are some ways to clear ISO history on Windows:
– In File Explorer, select History from the sidebar and right click to delete specific ISO entries or clear all history.

– Go to Settings > Privacy > Activity History and clear file history from there.
– Use the command ‘cleanmgr’ in Command Prompt to access the Disk Cleanup utility and wipe file history.
– Use a third party tool like CCleaner to erase recent file traces.

Clearing the ISO history will remove the references so the file doesn’t show up again after deletion. This helps speed up access to other files in frequent folders.

Preventing issues

There are a couple ways to avoid running into issues deleting ISO files in the future:

First, be sure to properly close any virtual drives after you are done using an ISO file. Many background programs will mount the ISO as a virtual drive which can lead to the file being in use and undeleteable. Use your virtual machine software to eject or unmount the ISO file when you are finished with it.

Second, avoid mounting ISO files as fixed drives. Mounting as a fixed drive essentially makes the virtual drive act as a real hard drive partition. This will keep the ISO file permanently mounted until manually disconnected. It’s better to mount ISOs as removable drives which makes it easier to eject when no longer needed.

Following these best practices will reduce the chances of an ISO file being stuck open in system processes. Then you can freely delete the ISO files without obstruction once they are properly disconnected from any virtual drives.