4

I want to completely remove openvpn from my pc (Linux Ubuntu 12.04) but when I type

sudo apt-get remove  openvpn 

the /etc/openvpn/ folder remains... How can I delete this too?

I want to delete openvpn so I can install it again because I think I did something stupid the first time :/

  • Do you know how to complete remove it?
  • Can you recommend me a good detailed tutorial about installing openvpn in ubuntu 12.10 and how to make certificates?
Fabby
  • 34,259

4 Answers4

4

You can't purge it after you remove it that's why it didn't work

sudo apt-get install openvpn && sudo apt-get purge openvpn 

and yes you can remove it manually (as you seem to have already figured out), see these files as well

/usr/lib/openvpn

/usr/include/openvpn

/usr/share/openvpn

/usr/share/man/man8/openvpn.8.gz

To see what files get installed with a package, you can usually run the whereis command to see what goes along with it.

example:

whereis openvpn

example output:

openvpn: /usr/sbin/openvpn /etc/openvpn /usr/lib/openvpn /usr/include/openvpn     
/usr/share/openvpn /usr/share/man/man8/openvpn.8.gz
mchid
  • 43,546
  • 8
  • 97
  • 150
2

Config is not deleted by a simple apt-get remove.

You want apt-get purge <package>.

Oli
  • 293,335
2

ok problem solved just type

cd /etc/
sudo rm -rf openvpn
-1

The recommended way is

sudo dpkg -r openvpn-as
  • That would simply uninstall the package, which the OP has done. You are perhaps thinking of -P ? The man page lists that as Purge, which DOES remove the lot. – Mark Williams Jan 16 '15 at 07:50
  • i installed openvpn, used it for awhile and uninstall that way. all the folders mentioned by OP is removed. – Tuan Anh Tran Jan 16 '15 at 08:31
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. – Fabby Jan 16 '15 at 09:12
  • @Fabby Actually, this is an answer - the question is "How to remove lingering /etc/openvpn/ directory - this attempts to provide an answer and is valid. – Thomas Ward Jan 16 '15 at 17:34
  • @ThomasW. IMHO not really. The OP should have done a purge, but alas doing a purge after the fact is impossible so a sudo rm -rf /etc/openvpn/ is the correct answer, but he already figured that out him/her/itself before this answer. ;-) – Fabby Jan 16 '15 at 17:40
  • @Fabby It's still an answer attempt albeit not a good one. It therefore does not fall under the 'Not an Answer' classification. – Thomas Ward Jan 16 '15 at 22:40
  • @ThomasW. OK. I bow to your wisdom... (All flags already removed, and I'll really try to remember, as contrarily to you, I am having something nice... A bit too much nice I'm afraid) ;-) – Fabby Jan 16 '15 at 22:51