Quote Originally Posted by caduardo21
The directory I tried to delete was empty but remove still did not work.
this should give more info why it failed:

Code:
int main( int argc, char *argv[] )
{
    if (remove("somedir") == -1)
    {
        perror("remove failed");
    }

    return ( 0 ) ;
}