Results 1 to 4 of 4

Thread: Cleaning up questions about /TMP and Deinstallation

  1. #1

    Red face Cleaning up questions about /TMP and Deinstallation

    Good morning Linux Experts of the World
    I have a couple of questions about "cleaning up / freeing up more diskspace on my Linux computer".. still being a Linux newbee.

    Software dependencies / de-installation:
    When I want to de-install an application (via Yast),
    YAST first checks for "software dependencies" of "possible trouble" before the actual action can take place.

    Question:
    1 - How does YAST does it job?
    2 - Where is the information stored (in which files, folders) that YAST uses to check these dependencies?
    3 - Is it possible to do this manually?

    About /TMP folder and freeing up disk space:
    Question:
    4 - Can I simply "delete all files and directories" that are located, created in the /TMP directory?
    5 - How can i determine WHICH PROGRAM has created which file in the /TMP directory?

    About other temp files and folders:
    Question:
    6 - Does Linux make a difference between "System Wide temporary files" and "user specific temporary files"
    7 - Where are those files located in the Linux File structure?

    Why do I want to know these facts?
    A - I want to clean up my harddisk to gain more free disk space.
    B - I really want to learn linux to the commandline level!

    Because after 28 years of windows, I really love this Open Source Operating System, and want to learn everything "under the hood" so i can "master" my computer again.

    Thanks for your wise answers, advice to my questions :-)

    Ronald

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Cleaning up questions about /TMP and Deinstallation

    Each package specifies what libraries and resources it depends on. These dependencies are known to the developers and the information is stored in the package. There is no need for you to try to retrace manually what the developers already did.

    The system will prevent you from pulling a dependency from under a dependent, but conversely doesn't tell you when some package isn't needed any more. Currently there is no easy way to find unneeded packages, those that are a dependency of another package, as in Debian's autoclean. However, unless it is a large package, you are unlikely to recover much disk space this way. If not loaded into memory, unused libraries only take up disk space.

    It is really only safe to clean /tmp outside of normal operation, e.g. before the system has gone to multi-user mode. Some /tmp files are in use while running, e.g. session storage for ssh, gpg, and it would be foolish to try to delete those while the system is live. CLEAR_TMP_DIRS_AT_BOOTUP=yes in /etc/sysconfig/cron will do what its name suggests.

    To be blunt, you are likely to recover more disk space by clearing browser caches and expiring log files than cleaning /tmp, unless it's a particular large file that's been put in /tmp.

    Enjoy your tweaking, but remember, some of the old practices from other OSes like defrag aren't needed in Linux.

  3. #3

    Default Re: Cleaning up questions about /TMP and Deinstallation

    Quote Originally Posted by ronaldvermeij View Post
    Question:
    1 - How does YAST does it job?
    2 - Where is the information stored (in which files, folders) that YAST uses to check these dependencies?
    3 - Is it possible to do this manually?
    YaST is using info generated from rpm database, and the engine is libzypper.

    You can use rpm directly but it's not to be generally recommended.
    About /TMP folder and freeing up disk space:
    Question:
    4 - Can I simply "delete all files and directories" that are located, created in the /TMP directory?
    5 - How can i determine WHICH PROGRAM has created which file in the /TMP directory?
    On boot up, you could create a new /tmp filesystem on it's own partition, or another disk, or use the VM based tmpfs which is effectively a RAM/swap based filesystem. /tmp is there for transient files really, though KDE creates sockets there, that ought better be in /var/tmp.
    When files are open, lsof(8) will tell you which process owns them. The tmp file naming conventions include the process name in them, but they're not system enforced, more a matter of convention supported by user space library routines.
    About other temp files and folders:
    Question:
    6 - Does Linux make a difference between "System Wide temporary files" and "user specific temporary files"
    7 - Where are those files located in the Linux File structure?
    The files I see in /tmp are only readable by the creating user, a "System Wide temporary" file appears to be an oxymoron.
    Why do I want to know these facts?
    A - I want to clean up my harddisk to gain more free disk space.
    B - I really want to learn linux to the commandline level!
    OK, well /tmp, /var/tmp, /var/log, /var/cache, /var/mail and /var/spool are places where there's file storage.

    Commands like du, and the KDE utility Kdirstat (which has been copied and ported to windows world, after it was first released by a SuSE developer) help find disk space.

    If you're finding /tmp getting clogged up, perhaps with Flash temporary video files or something, then enabling the YaST periodic clean up, should suffice.

    You might find, large amounts of space on thumbnails under /home/$USER in hidden directories starting with '.'. du --max-depth=2 might be very helpful to see.

    Quite frankly the price for 1TB disks now is so low, that I doubt the cost effectiveness of managing system disk space too tightly. Far better to use multiple partitions and keep large video and music collections in special purpose partitions.

  4. #4

    Default Re: Cleaning up questions about /TMP and Deinstallation

    OpenSUSE Weekly News/58 - openSUSE Look for 'rpmorphan' article, which may help find uncessary packages installed.

Tags for this Thread

Posting Permissions

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