Menu

gitpiper

Delete a submodule git Code Snippet in 2025

repositorysubmoduleadvanced

Last Updated: 22 April 2025

Deletes a submodule from the repository.

  • Use git submodule deinit -f -- <submodule> to unregister the specified <submodule>.
  • Use rm -rf .git/modules/<submodule> to remove the directory of the submodule.
  • Use git rm -f <submodule> to remove the working tree of the submodule.
git submodule deinit -f -- <submodule> rm -rf .git/modules/<submodule> git rm -f <submodule>
git submodule deinit -f -- 30code rm -rf .git/modules/30code git rm -f 30code # Removes the `30code` submodule

git snippet similar to Delete a submodule For You in April 2025

Subscribe to our Newsletter

Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️

© 2025 GitPiper. All rights reserved

Rackpiper Technology Inc

Company

About UsBlogContact

Subscribe to our Newsletter

Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️