Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?
share|improve this question

4 Answers 4

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

You want apt-get purge <package>.

share|improve this answer
    
i try sudo apt-get purge openvpn still nothing. –  Systeem Faillure Oct 30 '12 at 13:57
    
You may have to just delete that folder manually as well. Some packages to do not have the purge argument correctly configured, or will still save their configs for certain reasons. –  reverendj1 Oct 30 '12 at 15:27
    
i cant delete it manually :/ –  Systeem Faillure Oct 30 '12 at 16:25
    
Don't forget sudo... –  davidbaumann Jan 29 '14 at 1:31

ok problem solved just type

cd /etc/
sudo rm -rf openvpn
share|improve this answer

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
share|improve this answer

The recommended way is

sudo dpkg -r openvpn-as
share|improve this answer
    
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 at 7: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 at 8: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 at 9: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 W. Jan 16 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 at 17:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.