How to Clean your Windows PC using CMD (Command Prompt)

Open the Administrator Command Prompt:

  • Pick Win + X from the keyboard.
  • From the menu, choose “Command Prompt (Admin)” or “Windows PowerShell (Admin)”.

Examine Disk Utility

  • This application scans your hard drive for faulty sectors and file system issues, then resolves them.

chkdsk C: /f

Change C: to the drive letter you wish to examine.

System File Checker, or SFC:

  • SFC checks for and fixes system file corruption.

sfc /scannow

Empty Disk:

  • This command clears your system of any superfluous files.



  • With the help of this command, your hard drive’s file arrangement is optimized for quicker access.

defrag C:

Change C: to the drive letter that needs defragmenting.

See also  How to Lock or Unlock Notes on iPhone

Look Up Disk Space:

  • The quantity of utilised and empty space on your drives will be displayed by this command.

fsutil volume diskfree C:

Change C: to the drive letter you wish to examine.

TCP/IP Stack Reset:

  • You can use this command to resolve network-related problems.

netsh int ip reset

Clean Up DNS Cache:

  • The DNS resolver cache is cleared using this operation.

ipconfig /flushdns

Update and Fix Windows Hardware:

  • Several Windows components can be updated and fixed with this command.

dism /online /cleanup-image /restorehealth

Look for updates for Windows:

  • This command looks for updates that are available.
See also  How to Repair Windows 11 in 2023 (7 Methods)

wuauclt /detectnow

See Active Processes:

  • This command displays a list of active processes.


Destroy a Process:

  • With this command, a process can be terminated.

taskkill /IM processname.exe /F

  • Put the name of the process you wish to stop in lieu of processname.exe.

Leave a Comment