# Misconfiguration of filebeat on debian

**URL:** <https://discuss.elastic.co/t/misconfiguration-of-filebeat-on-debian/313864>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 7, 2022, 8:53am UTC](https://discuss.elastic.co/t/misconfiguration-of-filebeat-on-debian/313864 "2022-09-07T08:53:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mammodde](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@mammodde](https://discuss.elastic.co/u/mammodde)\
**Post date:** [September 7, 2022, 8:53am UTC](https://discuss.elastic.co/t/misconfiguration-of-filebeat-on-debian/313864/1 "2022-09-07T08:53:32Z")

</div>

Good morning, I am trying to install filebeat on debian with the deb file. The problem is that i have misconfigured it, so i tried to uninstall it.  
After the second installation i encountered a problem: it does not download the config files anymore, e.g. i go to `/etc/filebeat` there is no more filebeat.yml but only modules.d which is an empty directory instead of containing all modules.

i installed it with

```auto
curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.4.1-amd64.deb
sudo dpkg -i filebeat-8.4.1-amd64.deb

```

and uninstalled with

```auto
sudo dpkg -r filebeat

```

do you know why this happens? is there any way to have the right configuration back?  
thanks

---

<div class="post-metadata">

**Author:** ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)\
**Post date:** [September 8, 2022, 9:59am UTC](https://discuss.elastic.co/t/misconfiguration-of-filebeat-on-debian/313864/2 "2022-09-08T09:59:59Z")

</div>

Hello There!  
First of all, please remove old installation and purge it.

```auto
apt-get remove filebeat --purge

```

and

```auto
apt-get auteremove && apt-get autoclean

```

Also please remove filbeat directory:

```auto
rm -rv /etc/filebeat

```

Secondly you can use apt repository to install Filebeat - [docs](https://www.elastic.co/guide/en/beats/filebeat/current/setup-repositories.html) are here. I think it's the best way to install any software from Elastic.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 6, 2022, 12:00pm UTC](https://discuss.elastic.co/t/misconfiguration-of-filebeat-on-debian/313864/3 "2022-10-06T12:00:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
