# Apt-get update Elastic ERROR!

**URL:** https://discuss.elastic.co/t/apt-get-update-elastic-error/81447
**Category:** Elasticsearch
**Created:** [April 6, 2017, 10:40am UTC](https://discuss.elastic.co/t/apt-get-update-elastic-error/81447 "2017-04-06T10:40:02Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![safasalwan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/safasalwan/32/16563_2.png) [@safasalwan](https://discuss.elastic.co/u/safasalwan)
#### Post date: [April 6, 2017, 10:40am UTC](https://discuss.elastic.co/t/apt-get-update-elastic-error/81447/1 "2017-04-06T10:40:02Z")

</div>

Hey guys,

I noticed this error every time I run 'sudo apt-get update' :

```auto
W: Duplicate sources.list entry https://artifacts.elastic.co/packages/5.x/apt/ stable/main amd64 Packages (/var/lib/apt/lists/artifacts.elastic.co_packages_5.x_apt_dists_stable_main_binary-amd64_Packages)
W: Duplicate sources.list entry https://artifacts.elastic.co/packages/5.x/apt/ stable/main amd64 Packages (/var/lib/apt/lists/artifacts.elastic.co_packages_5.x_apt_dists_stable_main_binary-amd64_Packages)
W: Duplicate sources.list entry https://artifacts.elastic.co/packages/5.x/apt/ stable/main i386 Packages (/var/lib/apt/lists/artifacts.elastic.co_packages_5.x_apt_dists_stable_main_binary-i386_Packages)
W: Duplicate sources.list entry https://artifacts.elastic.co/packages/5.x/apt/ stable/main i386 Packages (/var/lib/apt/lists/artifacts.elastic.co_packages_5.x_apt_dists_stable_main_binary-i386_Packages)
**W: You may want to run apt-get update to correct these problems**

```

What could possible be wrong here? Any idea how I can fix it?

(it says run apt-get update to correct the problem, but it doesn't make sense, as it keeps appearing every time I do so!)

Thanks,  
Safa

---

<div class="post-metadata">

### Author: ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)
#### Post date: [April 6, 2017, 12:02pm UTC](https://discuss.elastic.co/t/apt-get-update-elastic-error/81447/2 "2017-04-06T12:02:57Z")

</div>

I believe that means that you two entries for our apt repository in some combination of `/etc/apt/sources.list` and `/etc/apt/sources.list.d/*`.

---

<div class="post-metadata">

### Author: ![safasalwan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/safasalwan/32/16563_2.png) [@safasalwan](https://discuss.elastic.co/u/safasalwan)
#### Post date: [April 7, 2017, 10:02pm UTC](https://discuss.elastic.co/t/apt-get-update-elastic-error/81447/3 "2017-04-07T22:02:26Z")

</div>

But how would I remove the duplicate?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 7, 2017, 11:55pm UTC](https://discuss.elastic.co/t/apt-get-update-elastic-error/81447/4 "2017-04-07T23:55:37Z")

</div>

Edit the source files(s) and remove the duplicate entries.

---

<div class="post-metadata">

### Author: ![safasalwan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/safasalwan/32/16563_2.png) [@safasalwan](https://discuss.elastic.co/u/safasalwan)
#### Post date: [April 10, 2017, 11:29am UTC](https://discuss.elastic.co/t/apt-get-update-elastic-error/81447/5 "2017-04-10T11:29:07Z")

</div>

Hey guys, there's another error now.

When I try to start filebeat,

```auto
 sudo /etc/init.d/filebeat start

```

this is what I get:

```auto
filebeat2017/04/10 11:25:31.465552 beat.go:339: CRIT Exiting: error loading config file: yaml: line 89: did not find expected key
Exiting: error loading config file: yaml: line 89: did not find expected key
   ...fail!

```

Line 89 is this:

```auto
template.name: "filebeat"

```

What is posibly the problem here?

---

<div class="post-metadata">

### Author: ![safasalwan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/safasalwan/32/16563_2.png) [@safasalwan](https://discuss.elastic.co/u/safasalwan)
#### Post date: [April 10, 2017, 11:37am UTC](https://discuss.elastic.co/t/apt-get-update-elastic-error/81447/7 "2017-04-10T11:37:44Z")

</div>

I removed the template section and commented the output to logstash, here's what I got. Config OK. Is this enough? What should be the next step?

```auto
osboxes@osboxes:/$ sudo /etc/init.d/filebeat start
2017/04/10 11:36:02.803387 beat.go:285: INFO Home path: [/usr/share/filebeat] Config path: [/etc/filebeat] Data path: [/var/lib/filebeat] Logs path: [/var/log/filebeat]
2017/04/10 11:36:02.805473 beat.go:186: INFO Setup Beat: filebeat; Version: 5.3.0
2017/04/10 11:36:02.805584 output.go:254: INFO Loading template enabled. Reading template file: /etc/filebeat/filebeat.template.json
2017/04/10 11:36:02.806005 output.go:265: INFO Loading template enabled for Elasticsearch 2.x. Reading template file: /etc/filebeat/filebeat.template-es2x.json
2017/04/10 11:36:02.806475 client.go:123: INFO Elasticsearch url: http://localhost:9200
2017/04/10 11:36:02.806550 outputs.go:108: INFO Activated elasticsearch as output plugin.
2017/04/10 11:36:02.806648 publish.go:295: INFO Publisher name: osboxes
2017/04/10 11:36:02.806804 async.go:63: INFO Flush Interval set to: 1s
2017/04/10 11:36:02.812158 async.go:64: INFO Max Bulk Size set to: 50
Config OK

```

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 11, 2017, 12:06am UTC](https://discuss.elastic.co/t/apt-get-update-elastic-error/81447/8 "2017-04-11T00:06:33Z")

</div>

You might be better off raising a new thread in #beats:filebeat 🙂

---

<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: [May 9, 2017, 12:17am UTC](https://discuss.elastic.co/t/apt-get-update-elastic-error/81447/9 "2017-05-09T00:17:35Z")

</div>

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