Keeping your calculator costless from clutter tin can assist ameliorate operation and free up tons of storage infinite. Windows comes with several built-in organization-cleanup utilities, such as the Disk Cleanup tool. Nevertheless, one lesser-known style to clean your computer is via the Command Prompt.

Here are a few ways to clean up a slow Windows calculator using Command Prompt.

Why Make clean Up Your Reckoner Using Command Prompt?

Command Prompt is a built-in command processor bachelor on virtually all Windows versions since Windows 3.1. While the graphical user interface is handy for most people, some may prefer the Command Prompt to perform several tasks for its efficiency and performance benefits.

If y'all are new to Microsoft's popular command processor, check out our beginner's guide to the Windows Command Prompt.

The Disk Cleanup tool and the Storage Sense feature in Windows 10 brand information technology fairly piece of cake to clean up your reckoner. If any unwanted files remain, you tin can remove them manually by, for example, immigration your temp folder. You tin speed upwardly this procedure with the help of commands to access the Disk Defragmenter, diskpart, and the Disk Cleanup tool.

Commands to Clean Your Computer Using CMD

Below is the list of commands to launch the deejay cleanup utility, clean temporary files, retention cache, and more than.

Some of these commands may require you to open up Command Prompt as administrator. Here's how to exercise it.

  1. Type cmd in the Windows search bar.
  2. Correct-click on Command Prompt.
  3. Select Run equally ambassador.

How to Defragment Hard disk With Command Prompt?

While deejay fragmentation on traditional hard disks is a natural occurrence, information technology can cause performance problems. It affects the admission and write speed of your disk, making your system ho-hum.

The Windows Command Prompt in the process of defragmentation, showing volume information and the expected results

Defragmentation rearranges fragmented data to help your disks work more efficiently. You don't need to defragment your SSD drives, just if you use a mechanical drive, hither's how to defragment the hard disk drive with a command.

  1. Open the Command Prompt as administrator.
  2. In the Command Prompt, type the following control and striking enter:
                  defrag c:            
  3. In the to a higher place command, c: is the drive that y'all desire to defrag. Change the bulldoze letter if you lot want to defrag some other drive.

You can run the defrag command with optional switches. This Microsoft Documentation offers more insight into using different syntax with the defrag command to perform analysis, add together exceptions, change priority, and more.

How to Utilize the Deejay Cleanup Utility via Command Prompt

The Windows Disk Cleanup program, a GUI app launched from a command prompt

Deejay Cleanup is a built-in Windows utility to assistance you gratuitous up space on your reckoner's hard bulldoze. Information technology tin can make clean up downloads, temporary cyberspace files, recycle bin, and fifty-fifty system files.

You tin can utilise the Command Prompt to launch Disk Cleanup and perform some automated cleanup tasks directly. Hither is how to use the tool and control-line switches supported.

Basic File Deletion

You tin use the cleanmgr command to launch the Deejay Cleanup tool using Command Prompt. To use it:

  1. Open Command Prompt, type cleanmgr, and hit Enter.
  2. In the Bulldoze Pick window, select the bulldoze you lot want to clean upwards and click OK.
  3. Next, in the Disk Cleanup window, select all the files y'all want to delete and click OK.
  4. Finally, click on Delete Files to confirm the activity.

Skipping Drive Selection

          cleanmgr /sageset        

Executing this command skips the drive selection step and shows the Deejay Cleanup settings window. From here, you tin select the files to delete.

Delete Files Automatically

If you would rather permit the Disk Cleanup utility decide what files to delete, use the cleanmgr /sagerun variant. Upon execution, information technology will scan your drives and delete junk files from your system.

          cleanmgr /sagerun        

Optimize for Low Space

The lowdisk switch, as the name suggests, is useful if you lot are running depression on storage space on your hard disk drive. When executed, it automatically checks all the files categories by default.

When using this class of the command, enter the drive letter for the partition to free up space. The command will look something like this:

          cleanmgr /lowdisk /d        

When executed, Disk Cleanup volition open with all junk files categories selected from the D: drive.

To delete all junk files chop-chop, without the user prompt, utilize the following command instead:

          cleanmgr /verylowdisk /d        

How to Articulate Temporary Files Using Command Prompt?

Windows creates temporary files for momentary apply. Temp files rarely occupy a big space on your hard bulldoze and are essential for the shine functioning of your arrangement. When the task is complete, your system should automatically discard them from the temporary folders.

The Disk Cleanup tool cleans temporary files that are older than seven days. But if you have to make clean the temp folder frequently, you can do it manually or using the Command Prompt.

The Windows Command Prompt with the del command in progress, showing some individual files that cannot be deleted

To view temporary files, enter the following command in Command Prompt:

          %SystemRoot%\explorer.exe %temp%\        

You lot can delete these files manually (Ctrl + A > Delete) from the File Explorer or use the following command to delete temp files:

          del %temp%\*.* /due south /q        

Command Prompt will automatically skip any file that is currently in use, simply it volition delete the balance.

Cleaning a Hd Using Diskpart

If you want to wipe make clean an unabridged disk, you tin can utilize the diskpart utility. Diskpart is a Windows control-line utility with support for over 38 commands for different functions.

To wipe clean a deejay, yous can apply diskpart's clean command. Upon execution, it deletes all the data and converts the disk into unallocated infinite.

The Windows command prompt running the DiskPart program, with available volumes listed

Do caution when using the diskpart utility. Using incorrect objects can cost you all of your data, and you may not be able to recover any of it at all. Therefore, we recommended you create a fill-in of your important organisation data earlier using the diskpart tool.

To make clean a disk:

  1. Blazon diskpart In the Command Prompt and hitting enter.
  2. Next, type list disk to view all the installed disks on your organization
  3. Select the deejay yous want to wipe clean. For example:
                  Select disk 0            
  4. If the disk condition shows offline, blazon online disk and hit enter.
  5. To wipe clean your disk, type the post-obit control and hit enter:
                  Clean all            
  6. Once completed, type leave to shut diskpart.

Keep Your Computer Clean From Junk Files Using Control Prompt

Yous can utilize the Command Prompt to perform various advanced actions, including removing junk files from your computer. While you can use the GUI-based Deejay Cleanup tool, Control Prompt makes it easy to clean upwardly individual category files and wipe clean disks.

xv Windows Command Prompt (CMD) Commands You Must Know

The control prompt is still a powerful Windows tool. Hither are the most useful CMD commands every Windows user needs to know.

Read Next

Nigh The Writer