[Tutorial] How to Delete Junk Files in Windows 10 Using CMD

Junk files will slow down your Windows 10 computer. This post is a detailed tutorial about how to delete junk files in Windows 10 using CMD, Run, Disk Cleanup, Recycle Bin, and a professional PC cleaner.

Posted by @Hedy December 17, 2024 Updated By @Hedy May 12, 2023

"Hi guys, does anyone know how to delete junk files in Windows 10 using CMD? It said I have to do that…but does anyone know how to do that without paying this as it said it affects my PC performance? Many thanks."

What are junk files Windows 10?

Junk files usually refer to useless files or those files you no longer need. Here are a few common types of junk files in Windows 10 or other Windows systems:

✿ Files in the Recycle Bin. When you delete a file, you may drag it to the Recycle Bin directly. If you don't empty the Bin manually, it continues biting the gigabytes of storage.

✿ Temporary files. As the name implies, temporary files are for temporary use only and are created automatically by the system itself and some applications when processing tasks.

✿ Cache files. They are also called temporary internet files. When you browse and return to a website, cache files appear and remain on your PC.

✿ Installer files. When you install new applications, it produces Installer files to aid in the installation of programs on your device. After installation, these files still exist.

✿ Windows and third-party software leftovers. When you uninstall a program, not all the files related to the software are deleted.

✿ Thumbnails. Thumbnails help a picture load faster if you see it again. However, you don't need to clean them unless necessary. If cleaned, your system will generate thumbnails again.

Why should you delete junk files Windows 10?

All kinds of sources are likely to generate junk files on your PC. The longer you use your computer, the more junk files it piles up. This is especially obvious when you don't clean up junk files regularly.

Keeping too many junk files on your devices will consume valuable disk space and even slow down your computer. Therefore, removing these junk files in Windows 10 is critically significant. It helps you make your files organized, free up more hard drive space, and improve system performance, making sure you can easily get rid of low disk space warning or C drive full issue.

5 ways to remove junk files from Windows computer

Since the junk files don't have any benefits, we will show you how to delete all junk files in Windows 10 or other Windows system computers. There are five methods for you to choose including how to delete junk files in Windows 10 using CMD, Run, or other Windows built-in tools. If something still remains, you can resort to a third-party PC cleaner. Now, let’s begin.

♦ How to delete junk files in Windows 10 using CMD

Command Prompt is a useful and quick way to remove temporary files from a PC. You can follow the steps below.

Step 1. Type "cmd" in the Windows search bar, right-click on Command Prompt, and select "Run as administrator".

Step 2. Type %SystemRoot%\explorer.exe %temp%\ and hit "Enter" to view temp files on your computer.

Step 3. Type del %temp%\*.*/s/q and press "Enter" to run the command. Then, Command Prompt will delete all temporary files except those currently in use.

Using CMD to delete large files is very effective. If you are not familiar with commands, please be careful about every step.

♦ How to delete junk files in Windows 10 using Run

The Run box allows users to open a program by name (if in the Windows directory) or launch any file by typing the full file path. Thus, you can delete junk files Windows 10 by typing the file path. Here are the steps.

Step 1. Press the Windows key + R together on your keyboard to open the Run box. Then, type "temp" in the blank field and click "OK".

Step 2. It leads you to the temp files location in Windows 10. Press the "Ctrl + A" keys to select the files and hit the "Delete" button.

Step 3. Open the Run command once again, type "%temp%" and click "OK".

Step 4. It takes you to the Local Temp files location. Press "Ctrl + A" to select all the files and hit the "Delete" key.

Step 5. Once again, open the Run command, and this time, type "prefetch" and move on.

Step 6. It guides you to the Prefetch files' location. Press the "Ctrl + A" keys together and press the "Delete" button.

♦ How to delete junk files in Windows 10 using Disk Cleanup

Disk Cleanup is a Windows built-in tool that helps to remove all types of junk files like Temporary files, Thumbnails and etc. You can check how much space these junk files occupy and how much space you can free up in this tool. Follow the below steps to see how to remove junk files Windows 10.

Step 1. Type "disk cleanup" in the search box, and hit "Enter".

Step 2. In the Disk Cleanup, select C drive (or other drives you want to clean) and click "OK".

Step 3. Tick the files you do not need and click "OK" to confirm the operation. And you can click "Clean up system files" to get more free space.

♦ How to delete junk files in Windows 10 using Recycle Bin

After knowing how to delete junk files in Windows 10 using CMD, Run, and Disk Cleanup, here comes a simple way. When you delete a file directly, it will go to the Recycle Bin. It continues occupying the disk space on your computer unless you empty the Bin. Therefore, cleaning up the Recycle Bin regularly is an effective way to help you get rid of unnecessary junk files from your Windows computer.

And the steps are very easy: right-click the Recycle Bin icon and select "Empty Recycle Bin". then, all files on your Bin will be erased completely.

♦ How to delete junk files in windows 10 using PC cleaner

To be honest, there are some other junk files produced by the Windows system that can't be deleted by CMD, Disk Cleanup, or other integrated tools in Windows, such as broken registry files, invalid shortcuts, etc. In order to delete these stubborn junk files from your computer, you can use a professional and advanced PC cleaner called AOMEI Partition Assistant Standard. It will scan all the junk files on your hard drives comprehensively and allows you to remove them effortlessly. It’s compatible with all editions of Windows 11/10/8/7/XP/Vista and a diverse range of computer models like Dell, Samsung, HP, etc.

Now, free download this software and learn how to delete all junk files in Windows 10/11/8/7:

Download FreewareWin 11/10/8.1/8/7/XP
Secure Download

Step 1. Install and launch AOMEI Partition Assistant Standard, and then click "Free up" > "PC Cleaner".

Step 2. In the pop-up window, click "Start Scan" to scan for junk files.

Step 3. Wait until the scanning process completes.

Step 4. After the scan is completed, all kinds of available junk files will be listed. Then, tick the options you want to clean, then click "Clean All" to begin the cleaning process.

Step 5. When you see a correct symbol displayed in the interface, you can click "Back" to exit the Window.

With the help of AOMEI Partition Assistant, deleting junk files in Windows 10 becomes an easy thing. What's more, it provides many practical features that help you get a better computer experience:

▣ App mover: It allows you to move files or programs from C drive to D drive to solve the C drive full problem. Delete large files: When your disk space is crowded with unused large files, this software enables you to delete them completely and securely. ▣ Disk clone Wizard: If you plan to upgrade to SSD but don't want to reinstall everything, this feature will perfectly satisfy your need. ▣ Migrate OS to SSD: You can choose this function when you just want to clone OS to another hard drive. ▣ ......

Conclusion

Junk files seem tiny on your PC but negatively impact your system performance. This passage shows you how to delete junk files in Windows 10 using CMD, Run, Disk Cleanup, Recycle Bin, and AOMEI Partition Assistant Standard   (Pro edition for more advanced features and Server edition for Windows Server users).

No matter which method you will apply, don't forget to develop a good habit of deleting junk files regularly. This will keep your computer always running in a good environment.