Disk Cleanup Not Deleting Files (Temp/Windows Update Files?)

Summary

What can we do when Disk Cleanup not deleting files, such as the temporary files, the Windows update files, etc. Here are several ways to run Disk Cleanup or remove files with free tools.

Andrew Wright

Update on 2024/10/02

by Andrew Wright

How to delete temp/log/trash files when Disk Cleanup failed?

Disk cleanup is a built-in Windows utility that helps users remove unnecessary files and free up space on their hard drives. However, some users have reported that they are unable to delete files using Disk Cleanup, even though they have followed all the steps correctly. In this article, we will explore some potential solutions to this problem.

Before we begin, it is important to note that Disk Cleanup is designed to remove temporary files, old logs, and other items that are no longer needed by the system. It is not intended to delete personal files, such as documents, music, or videos. If you are trying to delete personal files, you should do so using File Explorer or another file management tool.

With that said, here are some potential solutions to the problem of Disk Cleanup not deleting files:

Video - 2 ways to delete files when Disk Cleanup not working

This following video includes 2 ways to efficiently removing files that can save disk space when Disk Cleanup is not working.

#1 Run Disk Cleanup as an Administrator

One reason why Disk Cleanup may not be able to delete certain files is that it does not have the necessary permissions to do so. To overcome this, you can try running Disk Cleanup as an administrator. Here's how:

  • Right-click on the Disk Cleanup icon in the Start menu or on the desktop and select "Run as administrator".
  • When prompted, click "Yes" to allow the program to make changes to your computer.
  • Follow the prompts to select the drive you want to clean up and the types of files you want to delete.
  • Check the boxes next to the items you want to delete and click "OK".
  • Wait for Disk Cleanup to complete the cleanup process.

By running Disk Cleanup as an administrator, you give it the necessary permissions to delete files by using the following command lines in the cmd window. (You may copy and paste the following cmd in the cmd window)

This following cmd may save hundreds of MB space depending on how many temporary files the os holds.

%SystemRoot%\System32\Cmd.exe /c Cleanmgr /sageset:65535 & Cleanmgr /sagerun:65535

cmd to run disk cleanup when its not deleting files

#2 Configure storage sense and delete previous versions of Windows (system restore points)

It may save up to dozens of GB free disk space by deleting some previous Windows restore points.

To delete previous versions of Windows, open Disk Cleanup, select the drive you want to clean up, click "Clean up system files," check the box next to "Previous Windows installations," and click OK. Finally, confirm the deletion by clicking "Delete Files."

Delete previous version of Windows under Storage Sense

If it's not working, not deleting the previous Windows installation files, you may try it under Storage sense.

To delete previous versions of Windows in Configure Storage Sense, go to Settings > System > Storage > Configure Storage Sense. Turn on the toggle switch for Storage Sense and select "Clean Now" under "Free up space now." Check the box next to "Previous Windows installation(s)" and click "Remove files."

delete previous versions of windows

Windows Previous Versions is a feature that allows users to restore previous versions of files or folders that were accidentally deleted or modified. These previous versions can take up significant amounts of storage space on your computer's hard drive. If you need to free up space, you can delete Windows Previous Versions by following these steps:

  1. Open the Start menu and type "Disk Cleanup" in the search bar.
  2. Select the Disk Cleanup app from the search results.
  3. Choose the drive that you want to clean up and click OK.
  4. Click the "Clean up system files" button.
  5. Check the box next to "Previous Windows installations" and any other items you want to delete.
  6. Click OK and then click Delete Files to confirm.

This process will delete all previous versions of Windows and free up space on your computer's hard drive.

Delete System restore points in Disk Cleanup window

Another Way to Delete Windows System Restore Points (How to delete all restore points except the most recent one?)

Disk Cleanup window offers MORE OPTIONS that you may delete old system restore points to release free space.

delete restore points

Note: If right click C drive property does not show More options to delete restore points, you may open it by the following way:

Search column, type 'Disk Cleanup' -> Select c drive and run -> Click clean system files -> Choose c drive again -> Wait for the c drive cleaning up to be finshed, and then the window that has More options would show up.

#3 Disable User Account Control (UAC)

User Account Control is a security feature in Windows that prevents unauthorized changes to the system by requiring users to confirm any actions that require elevated privileges. However, this feature can sometimes interfere with Disk Cleanup's ability to delete files. To see if this is the case, you can try disabling UAC temporarily and running Disk Cleanup again. Here's how:

  • Click the Start menu and type "UAC" in the search box.
  • Click on "Change User Account Control settings" in the search results.
  • Move the slider to the bottom to turn off UAC and click "OK".
  • Restart your computer.
  • Run Disk Cleanup again and see if it is able to delete the files.

If this solution works, you may want to consider turning UAC back on after you have finished cleaning up your disk.

#4 Use a Disk Cleanup alternative

If Disk Cleanup still isn't able to delete the files you want to get rid of, you can try using a third-party disk cleanup tool. There are many such tools available online, and they can often be more effective than Disk Cleanup at removing files that are no longer needed. Some popular options include CCleaner, Glary Utilities, and Wise Disk Cleaner.

When using a third-party disk cleanup tool, be sure to choose one from a reputable source and read reviews from other users to ensure that it is safe and effective.

#5 Check file permissions

If Disk Cleanup is unable to delete a specific file, it may be because the file has restrictive permissions that prevent it from being modified or deleted. To check the file permissions, you can do the following:

  • Navigate to the location of the file in File Explorer.
  • Right-click on the file and select "Properties".
  • Click on the "Security" tab.
  • Check to see if your user account has permission to modify or delete the file. If not, click "Edit" and grant yourself the necessary permissions.
  • Try running Disk Cleanup again and see if it is able to delete the file.

#6 Check for file corruption

Sometimes files can become corrupted, which can prevent them from being deleted by Disk Cleanup or other tools.

Solution: Find these corrupted files and delete them manually.

How to delete Windows system update files when Disk Cleanup failed?

Here is the place where the system update folder is placed and you may manually delete all of them when Disk cleanup or other third party clean software failed.

file:///C:/Windows/SoftwareDistribution/Download/

You may copy and paste the above address in your browser or file explorer to reach the update folders and get them deleted.

How To Clear/Delete Windows System Restore Points

Clearing or Deleting Windows System Restore Points can free up disk space and remove outdated or unnecessary restore points. Below are the key steps to help you do this on a Windows machine, followed by a video guide.

Method 1: Delete All Restore Points

  1. Open System Protection:

    • Press Windows Key + S, type "Create a restore point", and select it from the results.
  2. Access Protection Settings:

    • In the System Properties window, under the System Protection tab, select the drive for which you want to delete restore points (typically C:), then click Configure.
  3. Delete All Restore Points:

    • In the window that appears, click the Delete button under the "Disk Space Usage" section. This will remove all existing restore points.
    • Confirm the action by clicking Continue in the prompt.
    • Click OK to exit.

Method 2: Delete All But the Most Recent Restore Point

  1. Open Disk Cleanup:

    • Press Windows Key + S, type "Disk Cleanup", and select the tool from the results.
  2. Select Drive:

    • Choose the drive where Windows is installed (typically C:) and click OK.
  3. Clean Up System Files:

    • In the Disk Cleanup window, click Clean up system files.
    • Select the drive again (usually C:), and the tool will recalculate the space.
  4. Delete Old Restore Points:

    • After the scan is complete, go to the More Options tab.
    • Under System Restore and Shadow Copies, click Clean up. This will delete all but the most recent restore point.
    • Confirm by clicking Delete in the prompt.

Method 3: Using Command Prompt (Advanced Users)

  1. Open Command Prompt as Admin:

    • Press Windows Key + X and select Command Prompt (Admin) or Windows Terminal (Admin).
  2. Enter the Command:

    vssadmin delete shadows /for=c: /all
    • Replace c: with the correct drive letter if necessary. This command deletes all system restore points on that drive.

Video: how to delete system restore points

Add 100+GB space to C drive with free tool

When disk cleanup did not clean as much free space as you expected, you may redistribute disk spaces from one to another using free tool Partition Resizer without losing data.

The data and OS are totally protected during the resizing. Watch the following video to know how to shrink a volume and add space to another.

Video: how to shrink a volume and expand another one without losing data

For Windows 11/10/8/7 => Download IM-Magic Partition Resizer Free (100% Free)

For Windows Server => Download IM-Magic Partition Resizer Server (Free Demo)

Related Product