• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

How to delete redundant junk files to speed up your computer with CMD

AnonyViet by AnonyViet
January 28, 2023
in Tips
0

Keeping your computer clutter-free can help improve performance and free up a lot of storage space. Windows comes with several built-in system cleaning utilities, such as the Disk Cleanup tool. However, there is a lesser known way to clean your computer with CMD.

Join the channel Telegram of the AnonyViet 👉 Link 👈

How to clean your PC with Command Prompt

Here are some ways to clean Windows using Command Prompt.

Why clean up PC with Command Prompt?

Command Prompt is a built-in command processor available on most versions of Windows since Windows 3.1. Although the graphical user interface is still suitable for most people, some people still prefer to use Command Prompt to perform some tasks for its benefits and performance.

If you are new to Command Prompt, then check out my Command Prompt articles here.

The Disk Cleanup tool and the Storage Sense feature in Windows 10 make cleaning up your computer even easier. If there are still any unwanted files, you can delete them manually, such as deleting your temp folder. You can speed up this process with the help of commands to access Disk Defragmenter, diskpart and Disk Cleanup tool.

Commands to clean junk files with CMD

Below is a list of commands to launch utilities that clean up disks, delete temporary files, cache and more.

Some of these commands may require you to open Command Prompt as an administrator. Here’s how to do it.

  1. Import cmd into the Windows search bar.
  2. Right click on Command Prompt.
  3. Select Run as administrator.

How to defragment a hard drive with CMD

While drive fragmentation on traditional hard disks is common, it can cause performance issues. It affects the speed of accessing and writing data of the drive, making your system slower.

How to delete redundant junk files to speed up your computer with CMD 7

Defrag rearranges fragmented data to make your drive more efficient. You don’t need to defragment your SSD, but if you use a mechanical HDD, here’s how to defragment it with commands.

Step 1: Open Command Prompt with Admin rights

Step 2: In the Command Prompt, type the following command and press enter:

defrag c:

Step 3: In the above command, c: is the drive that you want to defragment. Change the drive letter if you want to defrag another drive.

You can run the defrag command with different options. This Microsoft document provides more detailed information on using different options with defrag command to perform analysis, add exceptions, change priority and much more.

How to use Disk Cleanup with CMD

How to delete redundant junk files to speed up your computer with CMD 8

Disk Cleanup is a built-in Windows utility to help you free up space on your computer’s hard drive. It can clean downloaded files, temporary internet files, recycle bin and even system files.

You can use Command Prompt to launch Disk Cleanup and directly perform some automatic cleaning tasks. Here’s how to use the tool and supported commands.

Delete Basic File

You can use the cleanmgr command to launch the Disk Cleanup tool using the Command Prompt:

Step 1: Open Command Prompt, type cleanmgr and press Enter.

Step 2: In the window Drive Selectionselect the drive you want to clean and tap OK.

Step 3: Next, in the window Disk Cleanupselect all the files you want to delete and press OK.

Step 4: Finally, press Delete Files to confirm the action.

Skip Drive Selection

cleanmgr /sageset

Executing this command will skip the drive selection step and display the Disk Cleanup installation window. From here, you can select files to delete.

Automatically delete files

If you want to let the Disk Cleanup utility decide which files to delete, use the cleanmgr /sagerun command. Once executed, it will scan your drive and remove Junk Files from the system.

cleanmgr /sagerun

Optimized for low capacity drives

Option lowdisk, as the name suggests, is useful if the drive is running low on storage space. When executed, it automatically checks all File categories by default.

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

cleanmgr /lowdisk /d

When executed, Disk Cleanup will select all Junk File categories from drive D.

To delete all junk files quickly without user confirmation, use the following command:

cleanmgr /verylowdisk /d

How to delete Temporary Files with CMD

Windows creates temporary files for temporary use. Temporary files rarely take up large space on your hard drive and are essential for the system to function smoothly. When the task is complete, your system will automatically delete them from the temporary folders.

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

How to delete redundant junk files to speed up your computer with CMD 9

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

%SystemRoot%\explorer.exe %temp%\

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

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

The Command Prompt will automatically ignore any files that are currently in use, but it will delete the remaining files.

Clean up hard drive with Diskpart

If you want to wipe the entire drive, you can use the diskpart utility. Diskpart is a Windows command line utility with more than 38 commands for different functions.

To wipe the drive, you can use diskpart’s clean command. When executed, it erases all data and converts the disk to unallocated space.

How to delete redundant junk files to speed up your computer with CMD 10

Use caution when using the diskpart utility. Using the incorrect command may cause you to lose all data and you may not be able to recover any data. Therefore, I recommend that you create a backup of your system data before using the diskpart tool.

To clean up the drive:

Step 1: Import diskpart in Command Prompt and press enter.

Step 2: Next, type list disk to view all installed disks on your system.

Step 3: Select the disk you want to wipe. Eg:

Select disk 0

Step 4: If the disk status is offline, enter online disk and press enter.

Step 5: To wipe your disk, type the following command and press enter:

Clean all

Step 6: Once done, type exit to close diskpart.

You can use the Command Prompt to perform various advanced actions, including deleting Junk Files from your computer. While you can use the GUI-based Disk Cleanup tool, the Command Prompt makes it easy to clean individual directory files and wipe drives.

The article achieved: 5/5 – (100 votes)

Tags: CMDcomputerdeletefilesjunkredundantSpeed
Previous Post

8 best WiFi analyzer apps to help fix Internet connection errors

Next Post

How to design a beautiful and free Logo to promote your business

AnonyViet

AnonyViet

Related Posts

[Godot Shooter] #2: Creating characters & shooting bullets
Tips

[Godot Shooter] #2: Creating characters & shooting bullets

June 7, 2025
What do you need to learn game programming? Is it difficult? How long does it take?
Tips

What do you need to learn game programming? Is it difficult? How long does it take?

June 6, 2025
Instructions for registering chatgpt team at $ 1
Tips

Instructions for registering chatgpt team at $ 1

June 5, 2025
How to engrave the right mouse menu error on Windows
Tips

How to engrave the right mouse menu error on Windows

June 5, 2025
How to create online meme photos is very easy with a few steps
Tips

How to create online meme photos is very easy with a few steps

June 5, 2025
[Godot Engine] Export to Windows, Linux, MacOS, Android
Tips

[Godot Engine] Export to Windows, Linux, MacOS, Android

June 4, 2025
Next Post
How to design a beautiful and free Logo to promote your business

How to design a beautiful and free Logo to promote your business

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

[Godot Shooter] #2: Creating characters & shooting bullets

[Godot Shooter] #2: Creating characters & shooting bullets

June 7, 2025

Tải App 89Bet Để Trải Nghiệm Không Giới Hạn

June 6, 2025
What do you need to learn game programming? Is it difficult? How long does it take?

What do you need to learn game programming? Is it difficult? How long does it take?

June 6, 2025
Guide to search law with AI quickly and accurately

Guide to search law with AI quickly and accurately

June 6, 2025
[Godot Shooter] #2: Creating characters & shooting bullets

[Godot Shooter] #2: Creating characters & shooting bullets

June 7, 2025

Tải App 89Bet Để Trải Nghiệm Không Giới Hạn

June 6, 2025
What do you need to learn game programming? Is it difficult? How long does it take?

What do you need to learn game programming? Is it difficult? How long does it take?

June 6, 2025
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

[Godot Shooter] #2: Creating characters & shooting bullets

[Godot Shooter] #2: Creating characters & shooting bullets

June 7, 2025

Tải App 89Bet Để Trải Nghiệm Không Giới Hạn

June 6, 2025
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí SHBET https://kubet88.yoga/ bj88

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí SHBET https://kubet88.yoga/ bj88

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply