Cleaning your PC from the command prompt can help to free up disk space, remove temporary files, and improve system performance. Here are some commands you can use:
- Disk Cleanup:
The Disk Cleanup tool allows you to delete unnecessary files and folders from your computer, including temporary files, recycle bin, and system files. To run Disk Cleanup from the command prompt, follow these steps:
- Open the command prompt as an administrator
- Type "cleanmgr" and press Enter
- Select the drive you want to clean up (for example, "C:")
- Wait for the tool to scan your computer for files to delete
- Select the types of files you want to delete (for example, "Temporary files" or "Recycle Bin")
- Click "OK" to delete the selected files
- Delete temporary files:
You can also use the following commands to delete temporary files from your computer:
- To delete temporary files from your user account, type "del %temp%*" and press Enter
- To delete temporary files from all user accounts, type "del C:\Windows\Temp*" and press Enter
Note: Be careful when using the "del" command, as it can delete files permanently and cannot be undone.
- Uninstall programs:
You can use the following command to uninstall a program from your computer:
- To uninstall a program, type "wmic product where name='Program Name' call uninstall" and press Enter. Replace "Program Name" with the name of the program you want to uninstall.
Note: This command may not work for all programs, and some programs may require additional steps to uninstall.
- Disable startup programs:
You can use the following command to disable programs that start automatically when you log in to your computer:
- To disable a startup program, type "msconfig" and press Enter. In the System Configuration window, click the "Startup" tab and uncheck the box next to the program you want to disable.
Note: Be careful when disabling startup programs, as some programs may be necessary for your computer to function properly.