• Home
  • Windows
    • Windows 10
    • Windows 11
  • Mac
  • iOS
  • iPad
  • iPhone
  • Social Media
  • News
Wednesday, March 22, 2023
HowToFixIssue
Advertisement
  • Home
  • Windows
    • Windows 10
    • Windows 11
  • Mac
  • iOS
  • iPad
  • iPhone
  • Social Media
  • News
No Result
View All Result
  • Home
  • Windows
    • Windows 10
    • Windows 11
  • Mac
  • iOS
  • iPad
  • iPhone
  • Social Media
  • News
No Result
View All Result
HowToFixIssue
No Result
View All Result
Home Tips & Tricks

How to Clean Your Windows PC Using Command Prompt

October 14, 2022
in Tips & Tricks, Windows, Windows 10, Windows 11, Windows Troubleshooting
Reading Time: 13 mins read
How to Clean Your Windows PC Using Command Prompt

How to Clear Your Windows PC Utilizing Command Immediate.

Conserving your laptop free from litter can assist enhance efficiency and unlock tons of cupboard space. Windows comes with a number of built-in system-cleanup utilities, such because the Disk Cleanup software. Nevertheless, one lesser-known method to clear your laptop is through the Command Immediate.


Listed here are a number of methods to scrub up a sluggish Windows laptop utilizing Command Immediate.


Why Clear Up Your Laptop Utilizing Command Immediate?

Command Immediate is a built-in command processor out there on virtually all Windows variations since Windows 3.1. Whereas the graphical consumer interface is helpful for most individuals, some might choose the Command Immediate to carry out a number of duties for its effectivity and efficiency advantages.

Free Cheat Sheet: Obtain Our Free Windows CMD Instructions Cheat Sheet

In case you are new to Microsoft’s widespread command processor, try our newbie’s information to the Windows Command Immediate.

The Disk Cleanup software and the Storage Sense characteristic in Windows 10 make it pretty simple to scrub up your laptop. If any undesirable recordsdata stay, you may take away them manually by, for instance, clearing your temp folder. You may pace up this course of with the assistance of instructions to entry the Disk Defragmenter, diskpart, and the Disk Cleanup software.

Instructions to Clear Your Laptop Utilizing CMD

Beneath is the record of instructions to launch the disk cleanup utility, clear momentary recordsdata, reminiscence cache, and more.

A few of these instructions might require you to open Command Immediate as administrator. Right here’s how to do it.

  1. Sort cmd within the Windows search bar.
  2. Proper-click on Command Immediate.
  3. Choose Run as administrator.

How to Defragment Exhausting Disk With Command Immediate?

Whereas disk fragmentation on conventional exhausting disks is a pure incidence, it could trigger efficiency points. It impacts the entry and write pace of your disk, making your system sluggish.

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

Defragmentation rearranges fragmented information to assist your disks work more effectively. You don’t have to defragment your SSD storage units (nor it’s endorsed), however if you happen to use a mechanical drive, right here’s how to defragment the exhausting disk with a command.

  1. Open the Command Immediate as administrator.
  2. Within the Command Immediate, kind the next command and hit enter:
    defrag c:
  3. Within the above command, c: is the drive that you simply need to defrag. Change the drive letter if you wish to defrag one other drive.

You may run the defrag command with elective switches. This Microsoft Documentation presents more perception into utilizing totally different syntax with the defrag command to carry out evaluation, add exceptions, change precedence, and more.

Fast Disk Cleanup Utilizing the Run Field

disk cleanup using run command

You need to use a Run command to carry out a fast disk cleanup with out even opening the Command Immediate. Helpful if you wish to unlock a number of gigabytes of storage in two steps. This requires you to start out the Disk Cleanup software and specify the disk you need to clear through the Run dialog.

To run Disk Cleanup utilizing Run:

  1. Press Win + R to open Run.
  2. Sort the next command within the Run dialog:
    C:windowsSYSTEM32cleanmgr.exe /dDrive
  3. Within the above command, exchange Drive with the disk drive letter you need to clear. For instance, if you wish to carry out a fast cleanup for the E drive, then the complete command will seem like this:
    C:windowsSYSTEM32cleanmgr.exe /dE
  4. Click on OK or press Enter to execute the command.
  5. Run will shortly launch the Disk Cleanup software together with your specified drive chosen.
  6. Choose the recordsdata to delete and click on OK.

How to Use the Disk Cleanup Utility through Command Immediate

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

InterestingPosts

How to Make a Custom Alarm on iPhone [2023]

How to Right-Click Without a Mouse/Trackpad on Mac

Disk Cleanup is a built-in Windows utility that can assist you unlock area in your laptop’s exhausting drive. It will possibly clear up downloads, momentary web recordsdata, recycle bin, and even system recordsdata.

You need to use the Command Immediate to launch Disk Cleanup and carry out some automated cleanup duties immediately. Right here is how to make use of the software and supported command-line switches.

Primary File Deletion

You need to use the cleanmgr command to launch the Disk Cleanup software utilizing Command Immediate. To make use of it:

  1. Open Command Immediate, kind cleanmgr, and hit Enter.
  2. Within the Drive Choice window, choose the drive you need to clear up and click on OK.
  3. Subsequent, within the Disk Cleanup window, choose all of the recordsdata you need to delete and click on OK.
  4. Lastly, click on on Delete Recordsdata to substantiate the motion.

Skipping Drive Choice

cleanmgr /sageset

Executing this command skips the drive choice step and reveals the Disk Cleanup settings window. From right here, you may choose the recordsdata to delete.

Delete Recordsdata Routinely

In case you would fairly let the Disk Cleanup utility resolve what recordsdata to delete, use the cleanmgr /sagerun variant. Upon execution, it’ll scan your drives and delete junk recordsdata out of your system.

cleanmgr /sagerun

Optimize for Low House

The lowdisk swap, because the identify suggests, is helpful if you’re operating low on cupboard space in your exhausting disk. When executed, it robotically checks all of the recordsdata classes by default.

When utilizing this type of the command, enter the drive letter for the partition to unlock area. The command will look one thing like this:

cleanmgr /lowdisk /d

When executed, Disk Cleanup will open with all junk recordsdata classes chosen from the D: drive.

To delete all junk recordsdata shortly, with out the consumer immediate, use the next command as a substitute:

cleanmgr /verylowdisk /d

How to Clear Momentary Recordsdata Utilizing Command Immediate?

Windows creates momentary recordsdata for momentary use. Temp recordsdata not often occupy a big area in your exhausting drive and are important for the sleek functioning of your system. When the duty is full, your system ought to robotically discard them from the momentary folders.

The Disk Cleanup software cleans momentary recordsdata which can be older than seven days. But when it’s important to clear the temp folder often, you are able to do it manually or utilizing the Command Immediate.

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

To view momentary recordsdata, enter the next command in Command Immediate:

%SystemRoot%explorer.exe %temp%

You may delete these recordsdata manually (Ctrl + A > Delete) from the File Explorer or use the next command to delete temp recordsdata:

del %temp%*.* /s /q

Command Immediate will robotically skip any file that’s presently in use, however it’ll delete the remaining.

How to Delete Prefetch Recordsdata Utilizing Command Immediate

Prefetch recordsdata are momentary recordsdata created when an software is run in your Windows system. These recordsdata comprise data that’s used to optimize the execution of applications.

Just like different momentary recordsdata, prefetch recordsdata usually don’t take up a lot area in your exhausting drive. Nevertheless, if it’s worthwhile to delete prefetch recordsdata often, you should utilize the Command Immediate to cleanup these recordsdata in your system.

To delete prefetch recordsdata utilizing Command Immediate:

  1. Open Command Immediate as administrator.
    prefetch file folder windows
  2. Within the Command Immediate window, kind the next command to view the prefetch recordsdata:
    %SystemRoot%explorer.exe C:Windowsprefetch
  3. It would open the prefetch folder in File Explorer and present the prefetch recordsdata you can delete.
    prefetch file folder windows
  4. To delete the prefetch recordsdata, use the next command and hit enter:
    del C:Windowsprefetch*.*/s/q
  5. Command Immediate will present a listing of all of the deleted prefetch recordsdata.

Cleansing a Exhausting Disk Utilizing Diskpart

If you wish to wipe clear a whole disk, you should utilize the diskpart utility. Diskpart is a Windows command-line utility with assist for over 38 instructions for various capabilities.

To wipe clear a disk, you should utilize diskpart’s clear command. Upon execution, it deletes all the info and converts the disk into unallocated area.

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

Train warning when utilizing the diskpart utility. Utilizing incorrect objects can value you your entire information, and you might not be capable to get better any of it in any respect. Subsequently, we advisable you create a backup of your vital system information earlier than utilizing the diskpart software.

To scrub a disk:

  1. Sort diskpart Within the Command Immediate and hit enter.
  2. Subsequent, kind record disk to view all of the put in disks in your system
  3. Choose the disk you need to wipe clear. For instance:
    Choose disk 0
  4. If the disk standing reveals offline, kind on-line disk and hit enter.
  5. To wipe clear your disk, kind the next command and hit enter:
    Clear all
  6. As soon as accomplished, kind exit to shut diskpart.

Keep Your Laptop Clear From Junk Recordsdata Utilizing Command Immediate

You need to use the Command Immediate to carry out numerous superior actions, together with eradicating junk recordsdata out of your laptop. Whereas you should utilize the GUI-based Disk Cleanup software, Command Immediate makes it simple to scrub up particular person class recordsdata and wipe clear disks.


Check out more article on – How-To tutorial and latest highlights on – Technical News


Tags: Fix IssueFix Windows 11 IssuesFix Windows IssuesHow To FixHow To Fix IssueHow-To-3-Windows-TipsMicrosoft WindowsTechnical TroubleshootingWindows TipsWindows Tips & TricksWindows Tips and TricksWindows Tricks

Recommended.

A Device Attached To The System Is Not Functioning (7 Proven Ways)

A Device Attached To The System Is Not Functioning (7 Proven Ways)

October 16, 2022
How do I Blur Background During FaceTime Calls on iPhone, iPad, & Mac

How do I Blur Background During FaceTime Calls on iPhone, iPad, & Mac

March 21, 2023

Trending.

No Content Available
  • About
  • Advertise
  • Privacy & Policy
  • Contact
All about technical, android, mobile, windows relating website. We provide you with the latest technology straight from the industry.

© 2023 How To Fix Issue - All rights reserved.

No Result
View All Result
  • Home
  • Windows
    • Windows 10
    • Windows 11
  • Mac
  • iOS
  • iPad
  • iPhone
  • Social Media
  • News

© 2023 How To Fix Issue - All rights reserved.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
SAVE & ACCEPT
This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.
Go to mobile version