Forum Discussion

AlabamaCrimson's avatar
AlabamaCrimson
Iron Contributor
Jan 13, 2026

Simple way to remove or delete temporary files in Windows 10

My Windows 10 computer is running out of space and I've heard that temporary files are usually the cause. I'm not very tech-savvy and afraid of deleting something important that might break my computer. Is there a simple, safe way to clean these out?

Is there any good point or method that can easily remove or delete temporary files in Windows 10? I don't want to mess with complicated settings. If someone could give me a very simple, beginner-friendly guide on where to click, I'd really appreciate it. I just want to make sure I don't lose my photos or documents by mistake. Thank you!

7 Replies

  • Xioun's avatar
    Xioun
    Iron Contributor

    Attempting to delete temporary files that are currently in use by running applications or the system can cause errors. Windows usually prevents this, but forcefully deleting can cause instability.

  • CalahanReed's avatar
    CalahanReed
    Iron Contributor

    Using a manual batch script to delete temporary files on Windows 10 is a straightforward way to perform cleanup tasks with just a simple text file containing commands. Essentially, you write a set of instructions in a text editor that tell your computer to delete files from specific temporary folders. Once created, you can run this script whenever needed, and it will remove unnecessary temporary files, freeing up space and potentially improving performance.

    Here's how it works in your own words:

    1. Create a text file and write commands that tell your computer to delete files from the Temp folders — both your personal temp folder and the system-wide temp folder.

    2. Save this file with a .bat extension — this turns it into a batch script that your system can execute.

    3. Run the script as an administrator to ensure it has the necessary permissions to delete all files, especially from system folders.

    4. When executed, the script will go through the specified folders and delete temporary files, providing a quick way to clear out junk files manually.

    It's like giving your PC a quick "cleanup" command that you can run anytime, without needing third-party tools or complex software. Just a simple, custom set of instructions you control, making it a handy, efficient method for routine maintenance.

  • Daniolle's avatar
    Daniolle
    Iron Contributor

    Using PowerShell scripts is a powerful and flexible way to delete temporary files on Windows 10. It allows you to automate the cleanup process, especially if you want to perform regular maintenance or customize what gets deleted.

    How to Use PowerShell Scripts to Delete Temporary Files

    Basic Script to Delete User and System Temp Files

    Here is a simple PowerShell script that deletes temporary files from both the user and system temp folders:

    # Delete user temp files

    Remove-Item -Path "$env:TEMP\*" -Recurse -Force -ErrorAction SilentlyContinue

    # Delete system temp files

    Remove-Item -Path "C:\Windows\Temp\*" -Recurse -Force -ErrorAction SilentlyContinue

    Write-Output "Temporary files deleted successfully."

    How to Run the Script

    1. Open Notepad:

    Paste the script above into a new Notepad file.

    2. Save as a PowerShell Script:

    Save the file with a .ps1 extension, e.g., CleanTempFiles.ps1.

    3. Run PowerShell as Administrator:

    Search for PowerShell in the Start menu.

    Right-click Windows PowerShell and select Run as administrator.

    4. Set Execution Policy (if needed):

    To allow running scripts, execute:

    Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

    Confirm when prompted.

    5. Execute the Script:

    Navigate to the folder containing your script:

    cd path\to\your\script

    Run the script:

    .\CleanTempFiles.ps1

  • Using Storage Sense is a convenient and automated way to free up temporary files and maintain your Windows 10 system without manual effort. It can automatically delete unnecessary files, including temporary files, files in the Recycle Bin, and more, based on your configured settings.

    Step-to-Step of deleting temporary files on Windows 10 PC:

    1. Enable Storage Sense

    Open Settings:

    Press Win + I to open Settings.

    Go to System > Storage:

    Click on Storage in the left sidebar.

    Turn On Storage Sense:

    Toggle the switch to On under "Storage Sense."

    2. Configure Storage Sense Settings

    Click on "Configure Storage Sense or run it now":

    Here, you can customize how and when Storage Sense runs.

    Set your preferences:

    Automatically run Storage Sense: Choose how frequently (every day, week, month, or when disk space is low).

    Delete temporary files:

    You can select options like deleting temporary files, Recycle Bin, and Downloads folder if files haven't been changed for a specified period.

    Clean now:

    Click Run Storage Sense now to perform an immediate cleanup.

    3. Benefits of Using Storage Sense

    Automates cleanup of unnecessary files.

    Frees up disk space regularly.

    Reduces manual maintenance efforts.

    Customizable to suit your preferences.

  • CrosbyMarlin's avatar
    CrosbyMarlin
    Bronze Contributor

    Manually deleting temporary files is a direct and effective way to clear junk from Windows 10. These temp folders are used by the system and apps to store short-term data, but they often keep growing because many programs do not clean up after themselves. Removing these files is safe in most cases and can quickly free up disk space.

    To delete temporary files in Windows 10, press Win + R, type %temp%, and press Enter. This opens the temporary files folder for the current user. Select all files with Ctrl + A and press Delete. If Windows says some files are in use, just skip them—those are being used by running apps and cannot be removed right now.

    Next, press Win + R again, type C:\Windows\Temp, and press Enter. This folder contains system-level temporary files. You may be asked for administrator permission. Once inside, select all files and delete what you can, skipping anything Windows refuses to remove. Restarting the PC later can allow more files to be deleted. 

    This is one of the most recommended way for removing or deleting tmp files on Windows 10.

    Pros

    No extra software needed

    Works instantly and frees space fast

    Full control over what gets deleted

    Cons

    Not automatic, needs manual work

    Some files cannot be deleted while Windows is running

    Easy to forget to do regularly

  • Windows 10 has a built-in Storage feature designed to safely remove temporary files without affecting personal data. This method is beginner-friendly and recommended for older PCs because Windows automatically identifies system junk, update leftovers, and unused temp files that are safe to delete.

    How to delete temporary files in Windows 10

    1. Press Win + I to open Settings.

    2. Go to System > Storage.

    3. Click Temporary files under the main drive (usually C:).

    4. Wait while Windows scans the system.

    5. Check items like Temporary files, Windows Update Cleanup, and Recycle Bin if needed.

    6. Click Remove files to start the cleanup process.

    Using Storage Settings is the safest way to delete temporary files in Windows 10. It requires no extra tools, reduces disk clutter, and helps improve performance on slow or aging PCs when used regularly.

  • WaylonDiesel's avatar
    WaylonDiesel
    Iron Contributor

    Do you know what are caches and temporary files? Caches and temporary files are bits of data that Windows and apps save to speed things up. Cache files store frequently used information, like thumbnails or website data, so programs can load faster next time. Temporary files are created when apps run or install updates, but many of them are not removed automatically after they are no longer needed. You need to delete tmp files from Windows 10.

    On an old Windows 10 PC, these files can pile up over time and take a surprising amount of disk space. When the system drive gets crowded, Windows has less room to work, which can cause slow startup, laggy apps, and random freezes. Outdated cache files can also confuse programs and lead to errors or crashes.

    Deleting temporary files Windows 10 regularly helps keep the system clean and responsive. It frees up storage space, reduces clutter, and lets Windows run more smoothly on older hardware. While deleting them will not erase personal data, it can noticeably improve performance and stability on a long-used PC.

     

Resources