You can delete an individual file or an entire directory in your repository on GitHub.
People with write permissions can delete files or directories in a repository.
You can delete an individual file in your repository or an entire directory, including all the files in the directory.
If you try to delete a file or directory in a repository that you don’t have write permissions to, we'll fork the project to your personal account and help you send a pull request to the original repository after you commit your change. For more information, see "About pull requests."
If the file or directory you deleted contains sensitive data, the data will still be available in the repository's Git history. To completely remove the file from GitHub, you must remove the file from your repository's history. For more information, see "Removing sensitive data from a repository."
dropdown menu, then click Delete file.
GitHub pull request showing a dropdown menu with options to choose the commit author email address. octocat@github.com is selected." />
GitHub pull request showing a radio button to commit directly to the main branch or to create a new branch. New branch is selected." />
dropdown menu, then click Delete directory.
GitHub pull request showing a dropdown menu with options to choose the commit author email address. octocat@github.com is selected." />
GitHub pull request showing a radio button to commit directly to the main branch or to create a new branch. New branch is selected." />
All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.