How to Clean Windows PC Using Command Prompt

Clean Windows PC Using Command Prompt

In this article, we will tell you how you can clean Windows pc using the command prompt. So, without further ado, let’s get started!!

People love to work and make their assignments, and projects on Windows PC. These devices work quite efficiently and let people to done their tasks easily. It has several features like multiple desktops, malware protection, data security & privacy, and so on. Sometimes, your PC is running low on storage space and it happens when junk is stored in it. Due to this, your PC speed and performance gets affected. If you are unaware of how to remove malware from it via Command prompt utilities then, you are in a right place. 

Clean Windows PC Using Command Prompt

You can clean Windows PC via the cmd command that launches the disk cleanup utility, memory cache, clean temporary file, and so on. To do so, follow the simple steps:

  1. Head to the Start menu and type cmd in a search bar
  2. Choose the Command prompt and tap Run as administrator placed on the right side

Quick Cleanup Using Run box

Clean Windows PC

You can clean the Windows PC via the Run box without even opening Command prompt. To do so, follow the simple steps:

  1. Press the Win + R keys simultaneously to open up a Run dialogue box
  2. Type the following command and press Enter: C:\windows\SYSTEM32\cleanmgr.exe /dDrive
  3. In the above command, replace the word Drive with a disk drive letter (like E) you want to clean and press Enter: C:\windows\SYSTEM32\cleanmgr.exe /dE
  4. Run will quickly launch the Quick Cleanup tool with specified E drive selected
  5. Finally, tap the unnecessary files to delete them and choose Ok

Clear Temporary Files Using Command Prompt

Windows create temporary files for momentary use and if you want to clean the temp folder frequently, you can do it manually or via Command prompt.

  • If you want to view temp files, enter the below command:
%SystemRoot%\explorer.exe %temp%\
  • If you want to delete these files manually (press Ctrl + A > Delete) from a File Explorer or use the following command to delete temp files: 
del %temp%\*.* /s /q

It will skip any file automatically that is now in use but, it will remove other files.

Clear Prefetch Files Using Command Prompt

Clean Windows PC

Prefetch files are temporary files created when an app is run on a Windows system and if you want to remove these files frequently, use the Command Prompt to cleanup them on a system. To do so, follow the simple steps given below:

  • Head to the Command Prompt and run as administrator
  • In a window, type the following command to view the prefetch files:
%SystemRoot%\explorer.exe C:\Windows\prefetch\
  • Now, the prefetch folder opens up in File Explorer and shows the prefetch files that you want to delete
  • To delete the files, type the below command and press Enter: 
del C:\Windows\prefetch\*.*/s/q
  • Finally, the command prompt will display a list of all deleted prefetch files

Also see: How to Fix: “This song is currently unavailable” on Instagram

That’s it, guys! The above-mentioned details will surely help you to remove unnecessary files. Try these methods out and enjoy working on your Windows PC again. We hope that you liked our article How to Clean Windows PC Using Command Prompt. For any queries, do let us know and also, share your reviews in the comment box mentioned below.

Posted by
TechChalks

Admin at Tech Chalks, Love To Share My Experiences With the World of Tech Geeks.

Leave a Reply

Your email address will not be published.