Deltree command

Updated: 11/12/2023 by Computer Hope
deltree command

Short for delete tree, deltree is a command used to delete files and directories permanently from a computer.

Availability

Deltree is an external command that is available for the following Microsoft operating systems as deltree.exe.

Note

Users who are using Microsoft Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10, or Windows 11 should utilize the del or rmdir command.

Deltree syntax

Deletes a directory and all the subdirectories and files in it.

To delete one or more files and directories: DELTREE [/Y] [drive:]path [[drive:]path[...]]

/Y Suppresses prompting to confirm you want to delete the subdirectory.
[drive:]path Specifies the name of the directory you want to delete.
Warning

Use deltree cautiously. Every file and subdirectory in the specified directory are deleted. Once the data is deleted, you cannot recover the information.

Deltree examples

deltree c:\fake010

Deletes the fake010 directory and everything in it.