How to Clean your Windows PC using CMD

Windows offers several built-in system junk cleaning utilities to free up storage space. You can use them via Command Prompt to clean your system. Here’s how you can clean your Windows PC using CMD.

1. Defragment the Hard Disk via CMD

We will defrag our hard disk via CMD. This method will clean all junk files stored on selected drives.

1. Open Command Prompt with admin rights.

 

2. Enter the command:

defrag c:

defrag c:

Important: The above command will defrag the C: Drive of your PC. Change the drive letter if you want to defrag any other drive.

3. The Disk Defragment tool will scan the selected drive and remove the junk & temp files.

remove the junk & temp files

2. Run Disk Cleanup Utility via CMD

We will run Windows’ built-in Disk Cleanup utility to free up storage space.

1. Click on the Windows Start button and type in CMD. Right-click on the Command Prompt and select Run as Administrator.

 

2. Type in cleanmgr and press Enter.

cleanmgr

3. This will launch the Disk Cleanup utility. Select the drive you want to clean and click the Ok button.

Disk Cleanup utility

4. If you wish to skip the drive selection pop-up, enter the command:

cleanmgr /sageset

cleanmgr /sageset

You need to select the files to delete after executing the above command

5. If you wish to delete files automatically, then execute the command:

cleanmgr /sagerun

cleanmgr /sagerun

The above command will automatically scan your drives and delete junk files from your PC.

3. Clear Temporary Files Using the Command Prompt

You can also use CMD to clear the temporary files.

1. Click on Windows 11 Search and type Command Prompt. Right-click on the Command Prompt and select Run as administrator.

Run as administrator

2. Execute the given command:

%SystemRoot%\explorer.exe %temp%\

execute the given command

3. You can use the CTRL + A function to select all files. Once selected, you can delete them. Or else, execute the command to delete all temporary files.

del %temp%\*.* /s /q

delete all temporary files

4. Delete the Prefetch Files Using the Command Prompt

Prefetch files are temporary files you can delete to free up storage space.

1. Open Command Prompt with admin rights (right-click> Run as administrator).

Run Command Prompt As an Administrator

2. Execute this command:

%SystemRoot%\explorer.exe C:\Windows\prefetch\

execute this command

3. Execute this command to delete the Prefetch files:

del C:\Windows\prefetch\*.*/s/q

delete the Prefetch files

This guide explains how to clean your Windows PC via Command Prompt. If you have any doubts, let us know in the comment box below.

The post How to Clean your Windows PC using CMD appeared first on TechViral.



ethical hacking,hacking,bangla ethical hacking,bangla hacking tutorial,bangla tutorial,bangla hacking book,ethical hacking bangla,bangla,hacking apps,ethical hacking bangla tutorial,bangla hacking,bangla hacking pdf,bangla hacking video,bangla android hacking,bangla hacking tutorials,bangla fb hacking tutorial,bangla hacking book download,learn ethical hacking,hacking ebook,hacking tools,bangla ethical hacking course, tricks,hacking,ludo king tricks,whatsapp hacking trick 2019 tricks,wifi hacking tricks,hacking tricks: secret google tricks,simple hacking tricks,whatsapp hacking tricks,tips and tricks,wifi tricks,tech tricks,redmi tricks,hacking trick paytm cash,hacking trick helo app,hacking trick of helo app,paytm cash hacking trick,wifi password hacking,paytm cash hacking trick malayalam,hacker tricks, tips and tricks,pubg mobile tips and tricks,tricks,tips,tips and tricks for pubg mobile,100 tips and tricks,pubg tips and tricks,excel tips and tricks,google tips and tricks,kitchen tips and tricks,season 2 tips and tricks,android tips and tricks,fortnite tips and tricks,godnixon tips and tricks,free fire tips and tricks,advanced tips and tricks,whatsapp tips and tricks, facebook tricks,facebook,facebook hidden tricks,facebook tips and tricks,facebook latest tricks,facebook tips,facebook new tricks,facebook messenger tricks,facebook android app tricks,fb tricks,facebook app tricks,facebook tricks and tips,facebook tricks in hindi,tricks,facebook tutorial,new facebook tricks,cool facebook tricks,facebook tricks 2016,facebook tricks 2017,facebook secret tricks,facebook new tricks 2020,blogger blogspot seo tips and tricks,blogger tricks,blogger,blogger seo tips,blogger seo tips and tricks,seo for blogger,blogger seo in hindi,blogger seo best tips for increasing visitors,blogging tips and tricks,blogger blog seo,blogger seo in urdu,adsense approval trick,blogging tips and tricks for beginners,blogging tricks,blogger tutorial,blogger tricks 2016,blogger tricks 2017 bangla,tricks,bangla tutorial,bangla magic,bangla motivational video,bangla tricks,bangla tips,all bangla tips,magic tricks,akash bangla tricks,top 10 bangla tricks,tips and tricks,all bangla trick,bangla computer tricks,computer bangla tricks,bangla magic card tricks,ms word bangla tips and tricks,bangla computer tips,trick,psychology tricks,youtube bangla,magic tricks bangla,si trick Credit techviral
Previous Post