# Deleting a submodule

2 messages from 2009-03-12 to 2009-03-13. Participants: Pedro Melo, Alex Riesen.
Thread: https://gitlist.dev/t/18289

## Pedro Melo, 2009-03-12 17:31

Subject: Deleting a submodule
Message-ID: <20BA928D-7133-40E7-AB01-466F509F002C@simplicidade.org>
URL: https://gitlist.dev/e/20BA928D-7133-40E7-AB01-466F509F002C%40simplicidade.org

```
Hi,

I couldn't find a git-submodule command to delete a submodule. What is  
the correct procedure?

I did:

  * removed the entry from .gitmodules;
  * run git submodule sync

But its still recorded somewhere.

Thanks,
-- 
Pedro Melo
Blog: http://www.simplicidade.org/notes/
XMPP ID: melo@simplicidade.org
Use XMPP!

```

## Alex Riesen, 2009-03-13 08:14

Subject: Re: Deleting a submodule
Message-ID: <81b0412b0903130114j289e7ae1j527e16cd84a892fe@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0903130114j289e7ae1j527e16cd84a892fe%40mail.gmail.com
In-Reply-To: <20BA928D-7133-40E7-AB01-466F509F002C@simplicidade.org>

```
2009/3/12 Pedro Melo <melo@simplicidade.org>:
> I couldn't find a git-submodule command to delete a submodule. What is the
> correct procedure?
>
> I did:
>
>  * removed the entry from .gitmodules;
>  * run git submodule sync
>
> But its still recorded somewhere.

git rm --cached path/to/submodule
git commit -m'Submodule path/to/submodule removed'

```
