Many people don’t bother to delete old files on their PC and so they keep accumulating, only to give you a headache afterwards in terms of storage problems. It’s always good practice to delete old files you no longer care about to keep your PC free of unwanted files and running smoothly. Deleting old files on your Windows 11 PC not only gives you extra storage space, but also helps to keep your PC organized. Thanks to the features of Windows 11, you can easily delete auto old files.

Deleting old and unnecessary files on your Windows 11 PC can also boost performance to a certain extent. Bloatware is something you should get rid of right from the start. In this guide, we’ll show you different ways to automatically delete old files on a Windows 11 PC. So if you’re looking for ways to keep your PC clean, tidy and in tip-top shape, follow the methods mentioned in this guide.
Table of Contents
Does Windows 11 automatically delete old files?
Yes, Windows 11 offers you the option of automatically deleting old files from your PC. However, instead of Disk Cleanup, Windows 11 PCs get Storage Sense. It automatically analyzes old files and deletes them when your computer runs out of space. It regularly deletes old files from your Windows 11 PC in three different places, which we will discuss in the next part of this guide.
How can I automatically delete old files on Windows 11?
There are three methods you can use to auto delete old files in Windows 11. Let’s take a look at the methods one by one.
1. Use Storage Sense
Storage Sense offers you the option of automatically deleting old files from your Windows 11 PC at different intervals. You can also select different schedules, e.g. automatic deletion of old files when storage space is low. Here are the steps you need to follow:
- Press the Win + I keys to open the Settings menu on your Windows 11 computer.
- Select System in the left pane.

- Click on Storage.

- Toggle on the Storage Sense option.

- Click on Storage Sense to configure it.
- Under Configure cleanup schedules, select the desired time frame for the Run Storage Sense option. You can choose whether Storage Sense should be executed:
- Every day
- Every week
- Every month
- During low free disk space (default)
- Also, under the Delete files in my recycle bin, if they have been there for over drop-down, you can select the amount of time the files remain in Recycle Bin before they are automatically deleted.

- You can also select the option whether files should be deleted from your Downloads folder or not.

- After everything is set, hit the Run Storage Sense Now button to make the option work.

2. Use Command Prompt
Another easy way to automatically delete old files on your Windows 11 PC is to use the Command Prompt. You just need to run a few commands and the auto-delete function will work. Here’s how you can use Command Prompt to automatically delete old files on Windows 11.
- Press the Win key to open the Start menu.
- Type in Command Prompt and open it as an administrator.

- In order to delete files that you haven’t opened or used in the last 30 days, run the below command:
ForFiles /p "C:\path\to\folder"/s /d -30 /c "cmd /c del /q @file"
Here’s what the ForFiles command does:- /p – command ForFiles where to begin looking for files
– /s – the command starts searching in subfolders too
– /d – specifies the last modified date for a file
– /c – commands ForFiles to do something with the files.
– /q – will not ask for your confirmation to delete files(In the above command, the C:\path\to\folder refers to the location from where you want to delete the files, and /d -30 refers to the specific time frame for which you would like to delete your file. You can tweak the command as per your need.) - As soon as you execute the above command, the files you selected will be deleted.
- If you want to learn more about the ForFiles command, then you can run the ForFiles/? command in the command prompt and understand each command.
If you want to undo the actions of the ForFiles command, this is unfortunately not possible. As soon as you execute the command, old files on your Windows 11 PC are automatically deleted after the specified period of time. The only thing you can do is to move the files from the folder to another location.
3. Use Task Scheduler
The Task Scheduler is a great Windows tool to handle repetitive tasks. All you have to do is set up the task and the app will do it for you. You can run the ForFiles command from the Task Scheduler to automatically delete old files on Windows 11.
- Press the Win key to open the Start menu.
- Type task scheduler and open the appropriate result.

- Right-click on the Task Scheduler Library from the left pane and select New Folder.

- Enter any name you like and click OK.
- Right-click on the recently created folder and choose the Create Task option from the list that appears.

- Enter any name in the name field.
- In the General tab, under Security options, check the radio button for Run whether the user is logged on or not option and ensure that the Do not store password checkbox is unselected.

- Select the Triggers tab and select New.
- Choose On a schedule option using the Begin the task option.
- Under Settings, set up the time frame you would like the field to be autodeleted and click OK.
- Go to the Actions tab and click on New. From the Actions drop-down select Start a program option.
- In the Program/script box, type ForFiles.
- In the Add arguments box, type the below command:
/p "C:\path\to\folder"/s /d -30 /c "cmd /c del /q @file" - Tweak the above command as mentioned in the second method.
- Click OK.
- In the Settings tab, check the below options and click OK:
- Allow tasks to be run on demand.
- Run the task as soon as possible after a scheduled start is missed.
- If the task fails, restart every.
- Click OK to finalize everything.
If you have set up the Task Scheduler as described above, the files in the specified location will be deleted automatically within the specified time period. If you want to stop the automatic deletion, you can delete this task.
FAQs about automatically deleting files on Windows 11
1. Is it worth setting up automatic deletion?
That depends on how you manage your PC. If you are a person who deletes the file as soon as you are done with it, then it is not necessary to set up automatic deletion for removing old files. However, if you are a person who downloads a file and forgets that it is on your PC, then auto-deletion can help you get rid of the file without you having to do anything.
2. Is the Windows.old folder automatically deleted?
Yes, ten days after you have updated your PC, the Windows.old folder will be deleted automatically. If this doesn’t happen, you can delete it manually from your drive and free up disk space.
3. Is Storage Sense also available on Windows 10?
Yes, you can also find Storage Sense on Windows 10. Simply search for Storage Sense in the Start menu to access it. Otherwise, you can also access it under Settings>System>Storage>Storage Sense.


