Results 1 to 10 of 10

Thread: Clean up leftovers

  1. #1

    Default Clean up leftovers

    I am looking for a program or script that cleans out temp directories and unneeded remnants of past installs and uninstalls.

    Thanks.
    Thanks, Andy

    openSUSE 13.1 KDE (x86_64)
    Puppy Slacko 5.6.0
    Occasionally Windows XP

  2. #2
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,592
    Blog Entries
    14

    Default Re: Clean up leftovers

    This old one comes to mind: "Linux is not windows".
    F.e.: if you install a package, then uninstall it, the utmost that will remain is config files. Since the package is no longer there, the config files will not be used.
    From what you say, I read that you have the impression that traces of installs/uninstalls are all over the place in well hidden folders and files. That is "so windows".

    Ask yourself: why would you want this?
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  3. #3
    Join Date
    Sep 2012
    Location
    Canada
    Posts
    112

    Default Re: Clean up leftovers

    Hi andy77586,

    Quote Originally Posted by andy77586
    I am looking for a program or script that cleans out temp directories [...].
    For /tmp cleaning, you can simply edit /etc/sysconfig/cron and, for example, set CLEAR_TMP_DIRS_AT_BOOTUP to "yes". You can also specify other temporary files directories with TMP_DIRS_TO_CLEAR.

    As a side note, if your temporary files directory is a tmpfs mount point it will be cleared at each power-off. Applications should take care not to let temporary files all over the place anyway.

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Clean up leftovers

    On 2013-09-15 17:36, kalten wrote:

    > For /tmp cleaning, you can simply edit /etc/sysconfig/cron and, for
    > example, set CLEAR_TMP_DIRS_AT_BOOTUP to "yes". You can also specify
    > other temporary files directories with TMP_DIRS_TO_CLEAR.


    Those settings do not work with systemd. Or some of them.

    Look, this is an 11.4 system, with sysv:

    Code:
    cer@minas-tirith:~> l /etc/cron.daily/
    total 63
    drwxr-xr-x   2 root root   528 Dec 18  2012 ./
    drwxr-xr-x 144 root root 11000 Sep 15 21:09 ../
    -rwxr-xr-x   1 root root   970 Jul 10  2010 leafnode*
    -rwxr-xr-x   1 root root   635 Mar 13  2012 logrotate*
    -rwxr-xr-x   1 root root  1414 Dec  6  2011 packagekit-background.cron*
    -rwxr--r--   1 root root   948 Feb 23  2011 suse-clean_catman*
    -rwxr--r--   1 root root  1693 Feb 23  2011 suse-do_mandb*
    -rwxr-xr-x   1 root root   672 Feb 22  2011 suse-texlive*
    -rwxr-xr-x   1 root root  1538 Feb 18  2011 suse-updatedb*
    -rwxr-xr-x   1 root root   238 Feb 19  2011 suse.cron-sa-update*
    -rwxr-xr-x   1 root root  1875 Sep  1  2003 suse.de-backup-rc.config*
    -rwxr-xr-x   1 root root  2059 Sep  8  2003 suse.de-backup-rpmdb*
    -rwxr-xr-x   1 root root   566 Jul 23  2004 suse.de-check-battery*
    -rwxr-xr-x   1 root root  1380 Jan 13  2010 suse.de-clean-tmp*
    -rwxr-xr-x   1 root root   371 Sep  1  2003 suse.de-cron-local*
    cer@minas-tirith:~>

    And now, a 12.3 system with systemd:

    Code:
    Telcontar:~ # l /etc/cron.daily/
    total 96
    drwxr-xr-x   2 root root  4096 Aug 12 13:21 ./
    drwxr-xr-x 199 root root 20480 Sep 14 19:38 ../
    -rwxr-xr-x   1 root root   458 Nov 28  2012 leafnode*
    -rwxr-xr-x   1 root root   457 Nov 28  2012 leafnode~*
    -rwxr-xr-x   1 root root   634 Jul 29 11:08 logrotate*
    -rwxr-xr-x   1 root root   590 Mar 27  2011 logrotate~*
    -rwxr-xr-x   1 root root   778 Jun 19 10:09 mdadm*
    -rwxr-xr-x   1 root root  1297 Aug  3  2011 mlocate.cron*
    -rwxr-xr-x   1 root root  1414 Mar 13  2013 packagekit-background.cron*
    -rw-r--r--   1 root root   484 Oct 16  2005 smart
    -rwxr--r--   1 root root   948 Jan 27  2013 suse-clean_catman*
    -rwxr--r--   1 root root  1693 Jan 27  2013 suse-do_mandb*
    -rwxr-xr-x   1 root root  1379 Jul 19 15:06 suse-texlive*
    -rwxr-xr-x   1 root root   877 Feb 25  2013 suse.cron-sa-update*
    -rwxr-xr-x   1 root root  1875 Mar 28 16:25 suse.de-backup-rc.config*
    -rwxr-xr-x   1 root root  2059 Mar 28 16:25 suse.de-backup-rpmdb*
    -rwxr-xr-x   1 root root   566 Mar 28 16:25 suse.de-check-battery*
    -rwxr-xr-x   1 root root   371 Mar 28 16:25 suse.de-cron-local*
    -rwx------   1 root root   149 Nov 12  2005 suse.de-faxcron*
    -rwxr-xr-x   1 root root   744 Mar  1  2013 suse.de-snapper*
    Telcontar:~ #

    Do you see something different? About "clean-tmp"? ;-)


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  5. #5
    Join Date
    Sep 2012
    Location
    Canada
    Posts
    112

    Default Re: Clean up leftovers

    Quote Originally Posted by robin_listas
    Those settings do not work with systemd. Or some of them.
    Darn, you are right robin_listas. My bad. I just checked openSUSE 12.3 Release Notes:

    Quote Originally Posted by openSUSE 12.3 Release Notes
    5.2. systemd: Cleaning Directories (/tmp and /var/tmp)

    By default, systemd cleans tmp directories daily as configured in /usr/lib/tmpfiles.d/tmp.conf. Users can change it by copying /usr/lib/tmpfiles.d/tmp.conf to /etc/tmpfiles.d/tmp.conf and modifying the copied file. It will override /usr/lib/tmpfiles.d/tmp.conf.
    Note: systemd does not honor obsolete sysconfig variables in /etc/sysconfig/cron such as TMP_DIRS_TO_CLEAR.
    The good news for you, andy77586, is that your temporary files directory is already automatically cleaned .

  6. #6
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,041

    Default Re: Clean up leftovers

    On Sun, 15 Sep 2013 13:36:03 +0000, andy77586 wrote:

    > I am looking for a program or script that cleans out temp directories
    > and unneeded remnants of past installs and uninstalls.


    tmpwatch is what I use to clear out /tmp - it looks at the access dates
    on files and determines that way if the files are still needed.

    It's in the standard repositories.

    Jim

    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  7. #7

    Default Re: Clean up leftovers

    Quote Originally Posted by Knurpht View Post
    This old one comes to mind: "Linux is not windows".
    F.e.: if you install a package, then uninstall it, the utmost that will remain is config files. Since the package is no longer there, the config files will not be used.
    From what you say, I read that you have the impression that traces of installs/uninstalls are all over the place in well hidden folders and files. That is "so windows".

    Ask yourself: why would you want this?
    Was Windows mentioned ?

    Was there a comparison to Windows ?

    Chill out, life is too short.
    Thanks, Andy

    openSUSE 13.1 KDE (x86_64)
    Puppy Slacko 5.6.0
    Occasionally Windows XP

  8. #8

    Default Re: Clean up leftovers

    Can someone take the penguin off my label.

    I think most of us are above the level of an animal.
    Thanks, Andy

    openSUSE 13.1 KDE (x86_64)
    Puppy Slacko 5.6.0
    Occasionally Windows XP

  9. #9
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,719
    Blog Entries
    20

    Default Re: Clean up leftovers

    Quote Originally Posted by andy77586 View Post
    Can someone take the penguin off my label.

    I think most of us are above the level of an animal.
    The Label is part of the default settings for standard users in our vB implementation. And Penguins are a ref to TUX the Linux mascot.
    Leap 15_KDE
    My Articles Was I any help? If yes: Click the star below

  10. #10

    Default Re: Clean up leftovers

    Thanks for the helpful replies.

    I edited the chron file and said yes to some of the lines.

    I need to make a bash script to clean up files that I download.

    It will move zips to a storage directory and delete the rest.

    Andy
    Thanks, Andy

    openSUSE 13.1 KDE (x86_64)
    Puppy Slacko 5.6.0
    Occasionally Windows XP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •