OPNsense Forum

Archive => 18.7 Legacy Series => Topic started by: jjanzz on August 26, 2018, 09:53:16 am

Title: How to 'purge' a package?
Post by: jjanzz on August 26, 2018, 09:53:16 am
Hello,

What is the correct way to 'purge' a package? I've tinkered with the Suricata config files a bit too much and want to reinstall the package, giving a clean slate. However, using the webui just uninstalls it, keeping the config files. As far as I could find, pkg-delete (https://www.freebsd.org/cgi/man.cgi?query=pkg-delete&sektion=8&n=1) doesn't have an option for deleting a package including the configuration files that shipped with it.

Are you perhaps able to shine a light on this?

Thank you
Title: Re: How to 'purge' a package?
Post by: fabian on August 26, 2018, 12:33:32 pm
The answer is that the configuration is not shipped with the package and because of this it is not able to know which configuration files are around. OPNsense uses templates which are rendered to the file system and they currently cannot be revoked. If you want to remove the files, you have to "rm" them manually.
Title: Re: How to 'purge' a package?
Post by: jjanzz on August 26, 2018, 12:59:58 pm
If you want to remove the files, you have to "rm" them manually.

Thank you! Is there any way to restore the default files after I have removed them (except for a reinstallation)?
Title: Re: How to 'purge' a package?
Post by: fabian on August 26, 2018, 02:31:38 pm
templates: regenerate them (will be done via the web interface automatically) or the answer is no.
Title: Re: How to 'purge' a package?
Post by: jjanzz on August 28, 2018, 09:49:46 am
Thank you very much for your answer. I ended up reinstalling OPNsense, spend quite some work on it, but everything is back up and running. I know that there is a configuration export & import option, but it feels better to start with a clean slate :)