git/list[1] front-page[2] threads[3] people[4] search[5] about
 

How do I delete a git submodule?

From
Peter Krefting <peter@softwolves.pp.se>
Date
Nov 24, 2008, 14:44 UTC
Message-ID
<Pine.LNX.4.64.0811241537580.22925@ds9.cixit.se>
Hi!

I am trying to remove a submodule from a project, but can't figure out how to do it. With "modules/aldc" as a submodule:

  $ cat .gitmodules
  [submodule "modules/aldc"]
          path = modules/aldc
          url = [...cut...]
  [...more entries here...]
  $ git status
  [...cut...]
  nothing to commit (working directory clean)
Starting from a clean set-up.
  $ git submodule rm modules/aldc
  -ff17d9e0e76d01e99d26aa16b28cf327c5abb48a modules/aldc
  $ git status
  [...cut...]
  nothing to commit (working directory clean)

The obvious command didn't give any errors, but didn't do anything, either. (I notice that there is no mention of a "git submodule rm" on the git-submodule man page.)

  $ git rm modules/aldc
  rm 'modules/aldc'
  fatal: git rm: modules/aldc: Permission denied
  $ git status
  [...cut...]
  nothing to commit (working directory clean)
Nope, that didn't work either.
What am I missing?
  $ git --version
  git version 1.6.0.2.1172.ga5ed0
(This is Git-1.6.0.2-preview20080923 on Windows XP)
-- 
\\// Peter - http://www.softwolves.pp.se/
Next: Michael J Gruber
Message 1 of 2 in “How do I delete a git submodule?”
  1. Peter KreftingNov 24, 2008
  2. Michael J GruberNov 24, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.