I pulled the clean-up portion of the bakclean script out and made it stand-alone. You can now use the added script to clean-up your system without having to go to the trouble of configuring the back-up script and having to click through the menus.

It turned out that it was a good move because I found a bug that prevented it from emptying the trash cans when very large files and folder trees were in them. I should have known not to use the rm command but I did and it choked on large amounts of data. I fixed it in the 1.4b version.

The bakclean script was updated to fix the clean-up bug also.

You can find the stand-alone cleanout script in the original post at the beginning of the thread.

As usual, any and all feed-back is welcomed and encouraged.

Fred

Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.

I just tried the cleanout script on Elyssa Gnome. I had the same hangup as pjnsmb with 2.6.22-14-generic kernel. I manually created the directories it was complaining about, and it finished. It seems the 2.6.22-14 kernel did not get a clean removal and was only partially still in the file system, and it couldn't finish the script. Should the script display the "Clean-Out has successfully completed!" dialog when it's done? I never saw that. After getting past the kernel error, and running a second time, it just stops.

I'm running Elyssa Gnome with all repos enabled, and all updates applied through apt(not mintupdate). If you look in synaptic after install, the 2.6.22-14 kernel is listed under the "not installed" (residual config) section. Daryna had the same thing. I guess it is left over somehow from the process Clem uses to build Mint. If you try to remove it, apt complains that /lib/modules/2.6.22-14 isn't present and exits with an error(same error that . Upon checking /lib/modules, it only contains 2.6.24-16 & 19. This isn't really a problem with your script, but with apt not being able to remove the residual config for 2.6.22-14 because it wasn't removed cleanly and doesn't know how to resolve it. I manually created the 2.6.22-14 folder in /lib/modules, and the cleanup script (apt) removed it the second time, but stopped when it reached the point that I posted above. I know the 2.6.22 kernel was used early in Hardy development, but was removed from the repos later. You might have to ask Clem about the process he uses that causes this to be left over in each release.

"The only thing necessary for the triumph of evil is for good men to do nothing." Edmund Burke

I ran the cleanup script on my lappy(exact same setup). I fixed and removed the 2.6.22-14 residual config before running the script. It keeps hanging(same as desktop after fixing 2.6.22-14 problem). It has been at the same place for 15 min with no HD activity. There were no errors except for some normal dpkg errors while removing 2.6.24-16 kernel.

Well, I have been playing with this for over 2 hours now and still can't get it to hang! Jeeze, don't you love it when that happens. lol

I tried to duplicate your setup as best I could. On a fresh install of Mint 5 I ran the cleanout script. It choked on the 2.6.22 kernel but recovered and continued on through the script to the end. It just couldn't remove the rest of the old kernel files, as you already pointed out.

I then did an apt-get -y upgrade. Tried again, still had the problem with the 2.6.22 kernel remnants but otherwise it worked correctly and pulled a few other orphaned files, as expected.

Did you use:

chmod 755 /home/*/.ShellScripts/cleanout

to set the permissions?

and

sudo cp -a /home/*/.ShellScripts/cleanout /usr/bin

to put it in /usr/bin ?

You aren't by chance trying to use gksu or sudo are you? It should be started as a user. Type as a user "cleanout" in a terminal, without the quotes, to start it.

Scratching my head.

Fred

Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.

I followed all of the setup instructions in the cleanout file. I actually copied and pasted them into the terminal. I start it as user, and then it asks for my password. It will probably be something obvious when we find it. I will go through the script later tonight and see exactly what it is attempting to do. It may be something I've modified on my end. I'm trying to finish up my opensuse 11 install right now.

"The only thing necessary for the triumph of evil is for good men to do nothing." Edmund Burke

I wasn't trying to be a smarty pants. I had just started the install when I got your last message. I got it done now. I always share the HD with opensuse KDE I got the script to finish, but only by hitting enter when it seemed to hang. Between each command in the script it would stop and seem to hang indefinitely until I hit enter, and it would go on to the next. It cleaned everything out though I thought it would be a simple problem, but now I'm more confused. I don't have any idea why that would happen. My desktop and laptop both have fast dual procs, and both have 3GB RAM. I know it isn't a speed issue. I tried it while using the Mint 5 live CD just for kicks, and it worked like a dream. You don't realize how much junk is hiding in the corners. One thought I had was that you might give a warning about it cleaning the apt archives in case someone who doesn't know any better wants to make a backup of their packages with aptoncd. They will have to do it before the script cleans out the apt archives.

"The only thing necessary for the triumph of evil is for good men to do nothing." Edmund Burke

I have a question. I am running this script (the standalone cleanup script), and when I type cleanout in the terminal, the terminal without prompting me for a password drops me to a root prompt. Then if i type cleanout again it goes through the process. I am just wondering if that is supposed to happen or am I receiving an unexpected feature with the script?

No, shouldn't be an unexpected feature. The script has to run in root to do most of the tasks that it does. Remember that sudo can give you root privileges. Those privileges will stay in force in the terminal for some period of time, 5 or 10 min. I think, and you will then have to reenter your password to do root tasks. I suspect you had used sudo in the terminal in that time that sudo was active so you didh't have to reenter your password to continue as root.

The script sets the root environment instead of your user environment. When the root environment is set with sudo power it is persistent until the script ends, even if it takes longer than the 5 or 10 min. max. time. It is probably unusual for you to see a true root prompt instead of the user prompt. This is because when you use sudo the default is to use the user environment as root instead of the root environment.

Hope that wasn't too confusing.

Fred

Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.

Thats exactly what had happened. I should have realized that before I posted. Would this script work on a debian or ubuntu box without adjustment, or is it written for use on a mint system?Thanks for the reply and the script.

You should be able to use this on any Debian or derivative system that has sudo loaded on the system. I thought about modifying it so it didn't need to use sudo but haven't done it.

There are a couple other issues that need attention too. There have been a couple reports that while in one of the loops it stops and you have to hit enter to get it to continue. It seems to be hardware related. I haven't been able to duplicate the problem on my end but I suspect it is a timing issue with a spawned process.

The other problem is with Deborphan. Even though I have it running in a low aggressiveness mode it is still possible for some badly packaged deb codecs to be removed. This has not been a problem with Mint as Clem has done his homework, but it is a theoretical risk when using downloaded codecs of poor packaging quality. The only way I know to get around this is to generate a safe list of any codec packages that have this problem and hold them back from removal. But I haven't done this yet either.

I hope it is useful to you. If you have any problems with it or any suggestions please pass them back to me.

Thanks,

Fred

Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.

Fred Thanks for the info. I haven't had any problems with the script stopping and everything seems to still work fine. Although after I ran it the next time I booted my computer my conky script didn't load. I readded it to my start programs and it came back fine. My Debian setup is located in a virtualbox, I have just been using it to learn on, so if the script were to do something to it wouldn't cause me any major problems, maybe jsut make another learning experience.