OpenSuse Total Cleanup

Heyho folks!

Is there a way to remove all unnecessary stuff from the system that is not needed? Now, when I talk about “unnecessary stuff” I mean the TEMP folder as well as those files beginning with “.*” (for example .trashfile.txt). Those files don´t get deleted automatically either when uninstalling an application.

I thought that temp is cleared after reboot, but apparently all of that stuff is still in there. And here is an advice for the “smart” people thinking “Ey, just clean it by hand, dude!”: DO NOT DELETE THE TEMP FOLDER MANUALLY! (did that once with another system - it was a great cream pie afterwards).

IF there is a way to do this -maybe some implemented script/bash command- please let me know.
Main purpose of all the hype is the new 11.2. I won´t do a complete re-install, but certainly I want to get rid of everything not needed anymore by the system.

TheMask.

Some may or may not agree with this
Clear Temp Files at Boot - openSUSE Forums

Often it’s the case, that trying to remove stuff as you suggest can be more problematic than anything.

I would say a clean install is always the way to go. Just back up what you need! That way all the Crud goes in the format.

I absolutely agree with you, caf4926.
But thing is, if you have installed many applications and configured the system to work with CompizFusion, compiled own programs and it just WORKS for satisfaction, its a pain in the a## to do that all again. If thjere would be an easy way to at least keep the installed programs I´d say: TOP - way to go, just format that thing. Otherwise clearing with commands is the easiest way to go.

Or IS there actually a way to transfer all the installed programs (at least those installed through YaST)?

When you mean by “temp” and “THE TEMP FOLDER” the directory /tmp then I can add that:

  1. deleting it is stupid in any case, it is one of the main directories on the system;
  2. emptying it on a running system is also not very clever because a lot of running programs store there data they need during running (and during running only, that is where /tmp is for in the first place);
  3. deleting it at boot is a good practice and the link given by caf gives you the means to the end.

Honestly, it’ll take me about 2 hrs tops to install everything I use and Update, starting from scratch and importing back all my Docs etc…
There is no quick fix (sweeping it under the carpet) for what you want.

Youir other question seems to be:
When I deinstall/remove a package, why are not all the directories/files in all the home directories of all users deleted (irrespective if their names are starting with a . or not)?

I think when you contemplate a while about this you will see that this would ask for a rather clever mechanism. If by change your wife would create (for reasons she does not have to explain to us) a file with the name .trashfile.txt in her home directory, she would be furious when you, as system manager, removed the trashfile application and her file was gone (while she even never used that application at all).

Hi
Build rpms? I created a data partition and in there I have a
configuration directory. Then for things like scripts bashrc, profile,
signature etc I just create softlinks to my home directory (which is
on /) so I can run multiple systems and use the same configurations. I
also have some root ones as well.

The other thing I do is just a plain rpm repository for all those that
aren’t built on the OBS or downloaded from 3rd party.

Chances are you would need to recompile any applications manually built
as chances are the libraries, gcc have been updated…


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.2 RC 1 (i586) Kernel 2.6.31.3-1-desktop
up 18:40, 1 user, load average: 0.15, 0.09, 0.02
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

there a migrate-x app that showed up under redhat 5.1 I beleave that was a simple root cli tool (bash script) which grabbed current config, current users, and gave a chance to copy everything you marked as save to a new location. Then you would clean install and use it again to selectively stuff things back where they were. I used it through redhat 5.1, thru 7.0 and mandrake 7 thru 9. I lost it when I went to mandrake 9 (my bad, forgot to list it during restore and wiped the drive).
>:(

Honestly, it’ll take me about 2 hrs tops to install everything I use and Update, starting from scratch and importing back all my Docs etc…

Wow… you must be typing at the speed of light. For me it takes about a full week to replace one of the servers, reinstalling websites, speech synthesizers, mail, maillists, DNS, spam filters (and training them), databases (with replication) …

True. As you noticed I deleted TMP in a running system ONCE. Won´t happen again. Guess that´s doing by learning. :wink:

Malcolm, great to see you around! Well, if OpenSuse had a system tool to back up all applications and check for integrity for another system version (e.g. 11.2) I wouldn´t have opened this thread (if a developer reads this: such tool would be a great enhancement for OpenSuse). You figured out an intersting way as well.

Please keep in mind: That´s YOUR system… :wink:

Interesting thoughts, but I only do this if I want to hide something. I know where my hidden stuff is and I´m sure no wife will ever create such .*-files on MY computers. But in fact you are right -one might never know what those files are for.

Please keep in mind: That´s YOUR system… :wink:

Yep. That’s what I meant.
My root is usually about 10GB in use.

> Is there a way to remove all unnecessary stuff from the system that is
> not needed? Now, when I talk about “unnecessary stuff” I mean the TEMP
> folder as well as those files beginning with “.*” (for example
> .trashfile.txt)

heh, if you delete every file that begins with a “.” you will have a
BIG mess on your hands…

my free advice:

  1. it is easier to research a program BEFORE downloading it, than it
    is to install it and ten minutes later wish you had not…

  2. disk space is inexpensive…once installed, if it is not running
    it cost almost nothing to leave alone… just let it be… (but, next
    time, after the format install remember #1 above—see, i remember
    when you got here…a LOT of that just getting started, try
    everything since it is free is behind you…)


palladium

Already realized that deleting all .*-files is a bad idea.

Fact is, to re-install and to configure the system as it was before with all applications takes quite a long time.
I certainly wish there would be an integrated application to transfer and check integrity of programs to another fresh install on OpenSuse…

Already realized that deleting all .*-files is a bad idea.

Fact is, to re-install and to configure the system as it was before with all applications takes quite a long time.
I certainly wish there would be an integrated application to transfer and check integrity of programs to another fresh install on OpenSuse…

Hi
At the end of the day everyone has different requirements (else it
would be boring :wink: )

For example if it’s an application that takes a long time to compile,
then maybe you could statically link the libraries and have them
sitting in say /usr/local or /opt and have those as separate partitions
that don’t get formatted during an update.

Automate adding repo’s and applications via a script eg;


#!/bin/bash
sudo zypper ar http://url_to_some_repo some_repo
sudo zypper in this_application that_application


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.2 RC 1 (i586) Kernel 2.6.31.3-1-desktop
up 20:01, 1 user, load average: 0.05, 0.05, 0.04
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

On Mon, 26 Oct 2009 13:06:02 +0000, TheMask wrote:

> I thought that temp is cleared after reboot, but apparently all of that
> stuff is still in there. And here is an advice for the “smart” people
> thinking “Ey, just clean it by hand, dude!”: DO NOT DELETE THE TEMP
> FOLDER MANUALLY! (did that once with another system - it was a great
> cream pie afterwards).

You might look at tmpwatch - it’s designed to clear out the cruft from
the /tmp directory.

I have occasionally gone and blown away everything in /tmp though and
haven’t had significant problems as a result of that. The only thing
that was an issue was that there are files used by Xorg and you’ll run
into some problems with the current X session if you do it in runlevel
5. What sort of problems did you encounter?

Jim

Jim Henderson
openSUSE Forums Moderator

> I certainly wish there would be an integrated application to transfer
> and check integrity of programs to another fresh install on OpenSuse…

yep, it would be nice…and, maybe some day we have it…HOWEVER,
think about this…each time you do another fresh install there is
the likelihood that many of the programs you had installed on the last
system have themselves gone through revisions…

and, maybe (likely) they have new dependencies, libraries and scatter
links to different places, etc etc etc etc…so a FRESH install of
all of those is probably a pretty good way to make sure you only have
what you NEED and want…nothing left over from the old system…

now, instead of your “integrated application to transfer and check
integrity of programs to another fresh install” here is what i do (not
that any smarter than anyone else…it is just what has evolved here,
and works for me)

i keep notes of what i install as i go along, THEN, the next time i do
fresh install i have a GUIDE to get back to where i was…for
example, this got me from 10.2 to 10.3 and will guide me (some) to
whatever is next maybe 11.2, maybe debian:

during install, while on the installation settings page (where you can
select the software) select to install

  • thunderbird (from DVD) - development pattern
  • locate (from DVD) - mplayerplug-in
  • mc (from DVD) - mplayer
  • inkscape (from DVD) - kdenetwork3-query
  • atop (from DVD) - java-1_6_0-sun-plugin
  • mtr (from DVD) - java-1_6_0-sun
  • opera (from DVD) - kernel documentation (DVD)

DO NOT install beagle or kerry

AND enter expert partitioning and format the system partition and
mount the current home to the new home and check to use same user/password

after the install CD/DVD process is complete install:

ymmv

palladium

Cool, you all have developed great routines to cope with resetting the system everytime a new version comes out.But, you know, consider of a Linux system as one of the main persistence as one of the main differences between MS and and Linux in general. I’ve whole-heartedly adapted to this strategy and tend to treat my system like a little child…

Virtually a system lasts as long as no problems occur and the user is satisfies with it. Let me ask you this: Besides that the above conditiuons are met, how long does a Linux system live for YOU? :wink:

> I have occasionally gone and blown away everything in /tmp though and
> haven’t had significant problems as a result of that.

You can completely hose a running Oracle database…at least under AIX.

On Mon, 26 Oct 2009 18:30:57 +0000, GofBorg wrote:

>> I have occasionally gone and blown away everything in /tmp though and
>> haven’t had significant problems as a result of that.
>
> You can completely hose a running Oracle database…at least under AIX.

I guess that certain applications that use /tmp for something other than
temporary file storage would be affected.

Jim

Jim Henderson
openSUSE Forums Moderator