However, before running this command, you must first set up what files to delete by running the Disk Cleanup tool once manually.

You can run this command directly in or PowerShell (Admin) .

Replace c: with the drive letter you want to clean. This command doesn't require administrative privileges but might not work as expected.

If you want to automate disk cleanup tasks, consider setting up a task via Task Scheduler:

If you prefer using the command line or want to automate the process, you can use the cleanmgr command.