home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux.gentoo      Stupid OS you gotta compile EVERYTHING      17,684 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 15,689 of 17,684   
   Wim Cossement to Arthur Hagen   
   Re: proper method to clean house   
   19 Jun 07 10:50:40   
   
   From: a@b.c   
      
   Arthur Hagen wrote:   
   > AZ Nomad  wrote:   
   >> On Mon, 18 Jun 2007 20:22:08 -0600, ray  wrote:   
   >>   
   >>   
   >>> I find that my 10gb Gentoo partition has filled up. I find 1.8gb in   
   >>> /var/tmp/ccache and 1.2gb in /usr/src. I've been looking at   
   >>> gentoo.org in the docs section to find appropriate commands to clean   
   >>> things out, but without luck, so far. Can someone tell me how to do   
   >>> that or at least what is safe to delete.   
   >>   
   >>> thanks   
   >>   
   >> the only thing in /usr/src should be kernel and you can only get rid   
   >> of   
   >> it entirely if you won't be building any more packages that depend on   
   >> it. What you can do is a 'make mrproper' in it to clean out all the   
   >> object files. You can also get rid of all versions other than the   
   >> current running version. Do a 'uname -r' to get that information.   
   >   
   > Do not do "make mrproper" for the /current/ kernel, or you won't be able   
   > to emerge 3rd party modules.  In /usr/src/linux (which should be a   
   > symlink to the current kernel), do "make clean; make modules_prepare"   
   > instead.   
   >   
   > To get rid of all kernel versions except the latest you installed:   
   >   
   > emerge --prune sys-kernel/gentoo-sources   
   >   
   > (Substitute gentoo-sources with the kernel you use -- it could be   
   > hardened-sources or vanilla or bsd or...)   
   >   
   > After this, you can rm -r the directories for the versions you removed   
   > from under /usr/src/   
   >   
   >> You can also get rid of all the unused versions in /lib/modules.   
   >   
   > Just don't get rid of them if there still are kernels using them under   
   > /boot -- sometimes you want to be able to boot into an older kernel.   
   >   
   > Another few space savers:   
   >   
   > check /usr/portage/distfiles, and remove the older versions of any   
   > source package which you have more than one version of.  (Or zonk it all   
   > if you want to, but then you'll have to re-download the packages if   
   > rebuilding anything.)   
   > If you have gentoolkit installed, you might want to clean out   
   > /usr/portage/distfiles automatically by running "eclean-dist" (will only   
   > remove packages that no longer have an ebuild) or "eclean-dist -d" (to   
   > remove everything except what you need for a reinstall).   
   >   
   > For ccache, you can do:   
   > # if compiling something, wait until finished.   
   > cd /var/tmp/ccache   
   > rm -f tmp.*   
   > find . -type f -mtime +360 | xargs rm   
   > # adjust 360 to fit your needs - any files that old in days will be removed   
   > ccache -c    # this one will take a while   
   >   
   > To get rid of left-over files from emerge compiles:   
   > cd /var/tmp/portage   
   > rm -rf *   
   >   
   > If running apache:   
   > rm -f /tmp/sess_*   
   >   
   > If running mysql:   
   > # Unless you're running replication:   
   > mysql -e "purge master logs before '`date +%Y-%m-%d` 00:00:00'"   
   > # In any case:   
   > /usr/bin/mysqloptimize -As   
   >   
   > If using xfs (not the X font server, but the file system), emerge   
   > xfsdump and run:   
   > xfs_fsr -v   
   > # This will defragment all xfs hard drives, which can free up some space   
   > too, due to getting rid of unnecessary extents.   
   >   
   > Then there's /var/log/...  I recommend using the logrotate package or   
   > similar, and make sure that logs are rotated and compressed every now   
   > and then.   
      
   Also see if /var/log/portage/ is not taking up too much space...   
      
   I use this setup and am quite happy with it for my logs:   
      
      
   options {   
            perm(0640);   
            dir_perm(0750);   
            create_dirs(yes);   
      
            log_fifo_size(4096);   
      
            use_fqdn(no);   
            keep_hostname(yes);   
            chain_hostnames(no);   
      
            sync(0);   
      
            stats(43200);   
   };   
      
   source src {   
            unix-stream("/dev/log");   
            internal();   
            pipe("/proc/kmsg");   
   };   
      
   destination messages {   
            file("/var/log/messages/$R_YEAR/$R_MONTH/$R_YEAR-$R_MONTH-$R_DAY"   
              template("$ISODATE <$FACILITY.$PRIORITY> $MSG\n")   
              template_escape(no)   
            );   
   };   
      
   destination console_all { file("/dev/tty12"); };   
      
   log { source(src); destination(messages); };   
   log { source(src); destination(console_all); };   
      
      
   In order for this to work you must remove /var/log/messages when you   
   shut down syslog-ng or it won't work.   
      
   HTH,   
      
   Wimmy   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca