Operating System - HP-UX
1833576 Members
3551 Online
110061 Solutions
New Discussion

Is it safe to delete certain files

 
SOLVED
Go to solution
Gary Cooper_1
Esteemed Contributor

Is it safe to delete certain files

I have a number of users on my system who have left the department and I now want to delete their user accounts. Obviously, there are files on the sysytem who are owned by these users.

The files that I am concerned about are of the form:

./var/mail/
./var/dt/appconfig/appmanager/
./var/dt/appconfig/appmanager//Desktop_Apps
./var/dt/appconfig/appmanager//Desktop_Tools
./var/dt/appconfig/appmanager//Digital_Media
./var/dt/appconfig/appmanager//Information
./var/dt/appconfig/appmanager//System_Admin
./var/dt/appconfig/appmanager/
./var/dt/appconfig/appmanager//Desktop_Apps
./var/dt/appconfig/appmanager//Desktop_Tools
./var/dt/appconfig/appmanager//Digital_Media
./var/dt/appconfig/appmanager//Information
./var/dt/appconfig/appmanager//System_Admin

Is it safe to delete these files? (Before or after deleting the user account, or doesn't it matter).

Is there any other stuff hidden away that I should remove/update? (I'm aware of auto_home).

Thanks,

Gary
12 REPLIES 12
Mark Grant
Honored Contributor
Solution

Re: Is it safe to delete certain files

You should be able to safely delete any file owned by the user on the system. Most people don't actually bother though.
Never preceed any demonstration with anything more predictive than "watch this"
Jannik
Honored Contributor

Re: Is it safe to delete certain files

U could delete the above:
mail/ - is just that users mail
dt - is connected to the usages of desktop
jaton
Pete Randall
Outstanding Contributor

Re: Is it safe to delete certain files

Gary,

Absolutely - go ahead and delete them (after the account, I think).


Pete

Pete
Sanjay Kumar Suri
Honored Contributor

Re: Is it safe to delete certain files

Hello

var directory contains information such as logs and spooler files.

It is quite safe to remove them.

Regards.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Shahul
Esteemed Contributor

Re: Is it safe to delete certain files


Hi,

If you are sure about users and user directories are not needed anymore, you can go ahead with "userdel -r" command, which will cleanup user information and everything under home directory. Before you do this, you can do a find for those particular user's files under /var and remove it. Once you remove user, these files may not show owner properly.

Best of luck
Shahul
Sunil Sharma_1
Honored Contributor

Re: Is it safe to delete certain files

Hi Gary,

yes you can go ahead...
no probs

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Umapathy S
Honored Contributor

Re: Is it safe to delete certain files

Gary,
I am repeating what others said. It is safe to remove the files owned by a user. In /var usually the log files are kept.

HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
Pete Randall
Outstanding Contributor

Re: Is it safe to delete certain files

Gary,

As a matter of fact, you can safely blow away the contents of /var/dt/appconfig/appmanager/* (I just did!). Each users config will get recreated when they log in.


Pete

Pete
Elmar P. Kolkman
Honored Contributor

Re: Is it safe to delete certain files

If you remove the user before removing the files, you need to use the user-ID to find the files. There is no way the system can link the user-id back to the old username.

And like everyone else said, removing these files is no problem at all.
But removing all dirs under /var/dt/appconfig/appmanager/ is something I would be weary of: what happens with personal settings that are different from the default?
Every problem has at least one solution. Only some solutions are harder to find.
Pete Randall
Outstanding Contributor

Re: Is it safe to delete certain files

Elmar,

Personal settings should be store in ~/.dt


Pete

Pete
Gary Cooper_1
Esteemed Contributor

Re: Is it safe to delete certain files

Thanks for the rapid responses guys. It's much appreciated.

Sorry if I don't seem very gernerous with the points, but I guess you can work out my reasoning.

Keep up the good work.

Gary
Elmar P. Kolkman
Honored Contributor

Re: Is it safe to delete certain files

Pete, you're right. Sorry if I made some people uncertain with my comment...

Just looked more closely and found that for every user for every DISPLAY the user has used there is a directory containing some symlinks. This takes a lot of inodes. In our case, for instance, with about 100 users and using DHCP it resulted in a really large number of dirs and thus even more symlinks...
Every problem has at least one solution. Only some solutions are harder to find.