LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Finding configuration files. (https://www.linuxquestions.org/questions/linux-newbie-8/finding-configuration-files-4175538142/)

augustus_hill 03-29-2015 03:07 AM

Finding configuration files.
 
Using package manager to remove configuration files while uninstalling a software is easy but how to find and remove configuration files of software that you install from external sources? suppose i compiled from source of installed an external package, how to find and remove those configuration files that these programs created?

veerain 03-29-2015 03:13 AM

Usually configuration files are stored under /etc or a package specific sub-drectory.

For packages installed from source it will be installed as you specify it.

For autoconf (./configure) based sources you can specify the directory for it. Read the ouput of './configure --help' for that particular source.

It is usually './configure --sysconfdir=/etc'.

sycamorex 03-29-2015 03:38 AM

Also, common places for local config files per user are:
~/.local/share/name_of_your_package

or

~/.name_of_your_package


Please note the . in the path.

goodhombre 03-29-2015 04:36 AM

Hi augustus_hill,

It's usually different for each software. Some software provide uninstall scripts that will handle config files deletion for you. But in most of the cases you should search a config string that was used for software compilation. For example for php you can find it by running
Code:

php -i  | grep "Configure Command"
. Also you can check software installation documentation for defaults installation paths.

Hopefully it was helpful , good luck.


Quote:

Originally Posted by augustus_hill (Post 5339274)
Using package manager to remove configuration files while uninstalling a software is easy but how to find and remove configuration files of software that you install from external sources? suppose i compiled from source of installed an external package, how to find and remove those configuration files that these programs created?


joe_2000 03-29-2015 03:47 PM

When compiling from source many packages will have a
Code:

make uninstall
target, which will cleanly remove the installed software.

There is an even better approach available on many distros: Rather tan directly installing with "make install" you can build a package and install it through the package manager.

The advantage of that approach is that the package manager "knows" about the package, so that it can
a) include it into dependency calculations
b) remove it cleanly
... and probably more.

The exact procedure depends on the distro / package manager you are using.

Which distro are you on?

frankbell 03-29-2015 09:19 PM

You can also try the locate command.

Code:

bash-4.3$ locate blackbox
/etc/X11/xinit/xinitrc.blackbox
/var/log/packages/blackbox-0.70.1-x86_64-7
/var/log/packages/kblackbox-4.10.5-x86_64-1
/var/log/scripts/blackbox-0.70.1-x86_64-7
/var/log/scripts/kblackbox-4.10.5-x86_64-1
/usr/lib64/python2.7/site-packages/hgext/blackbox.pyc
/usr/lib64/python2.7/site-packages/hgext/blackbox.py
(and so on)



All times are GMT -5. The time now is 05:35 PM.