The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

/home/.cpan/ fills up with garbage

Discussion in 'General Discussion' started by sehh, Sep 25, 2007.

  1. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Europe
    Reading the output of /scripts/upcp that runs daily on my server, i noticed
    that the script downloads the SAME files over and over again, uncompresses them
    under /home/.cpan and just leaves them there, re-doing the same thing the next
    day (runs via a cron job).

    As a result, my /home/.cpan directory is about 200MB right now!!!

    Here is an example of the files under /home/.cpan/build:

    of course that continues for several pages and includes LOADS of other perl
    packages, not just Mail-SPF.

    Here is a part of the /scripts/upcp output:

    So the update scripts downloads a newer version, uncompresses it in a new
    directory, it ignores the fact that it has already downloaded the same file for
    several weeks now, compiles and tries to install it but fails for some reason.
    It goes on to re-do the same procedure the next time /scripts/upcp runs.

    Any help would be appreciated.
     
  2. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Good catch, I just checked mine and have nearly 900 tarballs and dirs in there, totaling almost a GB in space. I'd like to hear from someone with a little more knowledge than me, but I suspect it's probably safe to just delete the entire dir. My guess is that it will recreate itself as needed. I am just guessing though :)
     
  3. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Europe
    I know that its definitely safe to delete the contents of the /home/.cpan/build/ directory, but i am not sure about the others.
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You can safely delete the /home/.cpan/ directory. It will be recreated when upcp installs updates to perl modules. IIRC, whether file sare removed is down to CPAN.pm configuration.
     
  5. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Europe
    Now you are just trying to pass the problem to Perl and we know that its not a Perl problem but a cPanel script bug (/scripts/upcp?).

    Since its "upcp" that executes and updates perl/cpan along with its own modules and scripts, then its up to the "upcp" script itself to clean the /home/.cpan/ directory.

    Unless you put a big warning on cPanel that says "oh yeah, we forgot to tell you that its the admins responsibility to clean several GIGS of garbage from /home/.cpan/ because we can't spend 10 min to fix our script".
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If you feel strongly about this, I'd recommend creating a feature request about this at http://bugzilla.cpanel.net
     
  7. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Europe
    I've opened several bug reports, most of them are marked as "enhancements" by your staff and left there for years and years, you can look at them yourself, you'll find that most are never fixed.

    I've already opened a ticket in the bugzilla, and guess what.. it was marked as an "enhancement" as well... no big surprise there. Ticket number is 5935 in case you'd like to check.

    Sorry if i'm being sarcastic, but i'm tired of the complete lack of support. Sure, there is support for those paying for it or for the very big customers but for the rest of us i don't see anything happening any time soon.
     
  8. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If you believe it to be a support issue rather than a bug/feature request, then submit a support ticket rather than a bug report/feature request.
     
  9. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    While we're at it, how about claification on; remove / no remove, the following within the 'home' dir:

    cpanel-rpmstor/
    cpapachebuild/
    << this I would presume must/should stay
    .cpcpan/
    cprestore/
    cptmp/
    cpzendinstall/
    MySQL-install
     
  10. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    I've never had some of these, so don't really know but I would bet they pretty much all fall into the same category.
     
  11. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Europe
    I believe that /home/cprestore is used when a user clicks on the "backup my cpanel" option. cPanel generates a compressed archive of the home directory of the user and places it in there, then it allows the user to download it.

    Unfortunately those archives are never deleted or at least i've never seen cPanel delete them and its a well known trick to actually store whole GIGs for free because anything stored like that doesn't count against the users quota.

    So yes its safe to delete, unless one of your users is actively downloading a backup archive.
     
Loading...

Share This Page