Procedure for removal

28 views
Skip to first unread message

Phil Hagelberg

unread,
Nov 13, 2010, 6:16:32 PM11/13/10
to clojars-m...@googlegroups.com
I've had a couple requests to delete jars from Clojars. As I
understand it, a jar would need to be removed from the database as
well as from the filesystem. Is there an established procedure to do
this? I went poking around on the system and I think I found the db
and files, but didn't want to touch anything without really
understanding what I was doing. The /home/clojars/repo directory is
the equivalent of ~/.m2, so I understand how jars and poms would need
to be removed from there. And I guess to remove from the db it would
involve running "sqlite3 /home/clojars/data/db" and issuing some SQL
to perform the deletion; something like "delete from jars where
group_name = 'foo' and jar_name = 'bar';", or has the migration to
couchdb already been deployed?

If there's an automated way to do this I would feel a lot better about
it; I'm nervous about poking at a production DB like this.

-Phil

Alex Osborne

unread,
Nov 13, 2010, 8:29:04 PM11/13/10
to clojars-m...@googlegroups.com
Hi Phil,

Phil Hagelberg <ph...@hagelb.org> writes:

> I've had a couple requests to delete jars from Clojars. As I
> understand it, a jar would need to be removed from the database as
> well as from the filesystem. Is there an established procedure to do
> this? I went poking around on the system and I think I found the db
> and files, but didn't want to touch anything without really
> understanding what I was doing. The /home/clojars/repo directory is
> the equivalent of ~/.m2, so I understand how jars and poms would need
> to be removed from there. And I guess to remove from the db it would
> involve running "sqlite3 /home/clojars/data/db" and issuing some SQL
> to perform the deletion; something like "delete from jars where
> group_name = 'foo' and jar_name = 'bar';"

At the moment I just use a shell script which does exactly that. Try:

sudo -u clojars /home/clojars/bin/delete-jar group-id jar-id

There's also a "delete-group" script for deleting a whole group.

Hope that helps,

Alex

Phil Hagelberg

unread,
Nov 13, 2010, 11:52:12 PM11/13/10
to clojars-m...@googlegroups.com
On Sat, Nov 13, 2010 at 5:29 PM, Alex Osborne <a...@meshy.org> wrote:
> At the moment I just use a shell script which does exactly that.  Try:
>
>    sudo -u clojars /home/clojars/bin/delete-jar group-id jar-id
>
> There's also a "delete-group" script for deleting a whole group.
>
> Hope that helps,

Thanks; that's perfect.

-Phil

Reply all
Reply to author
Forward
0 new messages