Unable to delete a file
Hi,
I had installed VMware 10 on my ubuntu 14.10.
After i uninstalled it, i realized that a process called vmware-ifconfig is running and when i have no network connection
it consumes almost all my cpu resource.
after a smal investigation i found out that there are two files in my system which are:
1- /etc/init.
2- /usr/sbin/
so i tried to delete these files. but i couldnt. even not as root. although these files belong to root.
this is the result of ls -l on vmware-network
-rwxr-xr-x 1 root root 534 فوریه 11 23:43 vmware-network*
this is the result of ls -l on vmware-ifconfig
-rwxr-xr-x 1 root root 4313800 ژانوی 15 16:13 vmware-ifconfig*
I realy dont understand it. now my question is how i can uninstall vmware completely and why there is a file
that even root can not delete it.
thx in advance for your help
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Manfred Hampl
- Solved:
- Last query:
- Last reply:
Revision history for this message
![]() |
#1 |
How did you install VMWare?
Revision history for this message
![]() |
#2 |
with the following command
sudo sh ./setup.i386.bundle
and uninstall is done with
vmware-installer --uninstall-product vmware-workstation
but after uninstall those two files remain.
Revision history for this message
![]() |
#3 |
Maybe there is still a process running.
What is the output of the terminal commands
uname -a
lsb_release -crid
sudo updatedb
locate vmware
ps ax | grep vmware
sudo fuser -v /etc/init.
sudo fuser -v /usr/sbin/
Revision history for this message
![]() |
#4 |
Was going to request that myself...
Revision history for this message
![]() |
#5 |
#uname -a
Linux zaal 3.16.0-30-generic #40-Ubuntu SMP Mon Jan 12 22:07:27 UTC 2015 i686 i686 i686 GNU/Linux
#lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 14.10
Release: 14.10
Codename: utopic
#sudo updatedb
#locate vmware
/etc/init.
/etc/rc2.
/etc/rc3.
/etc/rc5.
/home/fariborz/
/home/fariborz/
/home/fariborz/
/home/fariborz/
/usr/bin/vmwarectrl
/usr/lib/
/usr/lib/
/usr/sbin/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/var/lib/vmware
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/log/vmware
/var/log/
/var/log/
/var/log/
/var/log/
/var/log/
/var/log/
/var/log/
/var/log/
#ps ax | grep vmware
12771 pts/27 S+ 0:00 grep --color=auto vmware
#sudo fuser -v /etc/init.
#sudo fuser -v /usr/sbin/
Few of the commands have no output.
Revision history for this message
![]() |
#6 |
I do not see anything strange.
What is the output of the commands
sudo rm -v /etc/init.
sudo rm -v /usr/sbin/
and if that again fails
file /etc/init.
file /usr/sbin/
Revision history for this message
![]() |
#7 |
#sudo fuser -v /usr/sbin/
/usr/sbin/
Revision history for this message
![]() |
#8 |
Now there is a process shown that accesses one of the two files; such process was not shown in the previous output. Have you restarted you computer since the previous output? (process ID 1358, executing vmware-ifconfig)
The terminal command
sudo fuser -vk /usr/sbin/
should kill that process, and you should then be able to delete that file.
I assume you have to delete these four files
/etc/init.
/etc/rc2.
/etc/rc3.
/etc/rc5.
to avoid that a new process is started after the next reboot.
Revision history for this message
![]() |
#9 |
yes i had restarted my laptop.
sudo rm /etc/init.
rm: das Entfernen von »/etc/init.
as i said. even with user root and having killed the process, i am not able to remove those files.
i could delete now these three files
/etc/rc2.
/etc/rc3.
/etc/rc5.
andn will restart now my laptop to see if the system will again access the /etc/init.
Revision history for this message
![]() |
#10 |
rebooted the system.
the vmware-ifconfig is not more running.
but both files /etc/init.
are still there and i am still not able to delete them. even not with the user root.
Revision history for this message
![]() |
#11 |
What is the output of
LANG=C ls -l /etc/init.
LANG=C ls -l /usr/sbin/
LANG=C file /etc/init.
LANG=C file /usr/sbin/
Revision history for this message
![]() |
#12 |
#LANG=C ls -l /etc/init.
-rwxr-xr-x 1 root root 534 فو� 11 23:43 /etc/init.
#LANG=C ls -l /usr/sbin/
-rwxr-xr-x 1 root root 4313800 ژا� 15 16:13 /usr/sbin/
#LANG=C file /etc/init.
/etc/init.
#LANG=C file /usr/sbin/
/usr/sbin/
Revision history for this message
![]() |
#13 |
I don't see any reason that the deletion of the files should not work.
What is the output of the terminal commands
LANG=C sudo rm -v /etc/init.
echo $?
LANG=C sudo rm -v /usr/sbin/
echo $?
Revision history for this message
![]() |
#14 |
LANG=C sudo rm -v /etc/init.
rm: cannot remove '/etc/init.
LANG=C sudo rm -v /etc/init.
rm: cannot remove '/etc/init.
echo $?
1
LANG=C sudo rm -v /usr/sbin/
rm: cannot remove '/usr/sbin/
echo $?
1
Revision history for this message
![]() |
#15 |
Maybe there are special file attributes set
What is the output of
sudo lsattr /etc/init.
Revision history for this message
![]() |
#16 |
sudo lsattr /etc/init.
----i--------e-- /etc/init.
----i--------e-- /usr/sbin/
Revision history for this message
![]() |
#17 |
I think that's it: the files have the 'immutable' attribute set.
Try
sudo chattr -i /etc/init.
sudo rm -v /etc/init.
Revision history for this message
![]() |
#18 |
wow wow wow
great
that works.
but what are these special attributes. and what about files found with locate under kernel like:
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
/usr/src/
could you explain this to me please?
Anyhow thanx a lot.
Revision history for this message
![]() |
#19 |
On file systems with exz2 ex3 or ext4 formatting you can set additional attributes (besides the standard access rights). It seems that the VMware installer has set the immutable flag on these files, leading to the situation that the files could not be easily removed. I would not care too much about that.
The .../include/
They are not from the VMware workstation installation, but are part of a normal Ubuntu installation. You should leave them as they are. Similar for files with names containing xserver-
Remark: You seem to have at least 5 versions of the kernel header package installed. Usually you should keep only the newest one or two and purge the older ones (those with lower version number) to free up space.
I assume if you run the command
sudo apt-get --purge autoremove
It will uninstall the outdated version and leave only the last one installed.
(You can test with "apt-get --simulate --purge autoremove" to see the list of packages that would be removed.)
Running "locate vmware" afterwards will then most probably show only the ...-3.16.0-30-... directory any more (and maybe the ...-3.16.0-29-... directory).