# /etc/apt/sources.list

**URL:** <https://dietpi.com/forum/t/etc-apt-sources-list/2244>\
**Category:** Troubleshooting\
**Created:** [8 May 2018 13:08 UTC](https://dietpi.com/forum/t/etc-apt-sources-list/2244 "2018-05-08T13:08:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WarHawk](https://dietpi.com/forum/user_avatar/dietpi.com/warhawk/32/21_2.png) [@WarHawk](https://dietpi.com/forum/u/WarHawk)\
**Post date:** [8 May 2018 13:08 UTC](https://dietpi.com/forum/t/etc-apt-sources-list/2244/1 "2018-05-08T13:08:29Z")

</div>

What is the correct /etc/apt/sources.list supposed to be?

I borked my apt-get update I think

mine currently shows

```nohighlight
# cat /etc/apt/sources.list
deb http://deb.debian.org/debian/ stretch main contrib non-free
deb http://deb.debian.org/debian/ stretch-updates main contrib non-free
deb http://deb.debian.org/debian-security/ stretch-updates main contrib non-free
deb http://deb.debian.org/debian/ stretch-backports main contrib non-free

```

The reason I am asking is I keep getting this error

```nohighlight
E: Unable to parse package file /var/lib/dpkg/status (1)
W: You may want to run apt-get update to correct these problems
E: The package cache file is corrupted

```

---

<div class="post-metadata">

**Author:** ![Fourdee](https://dietpi.com/forum/user_avatar/dietpi.com/fourdee/32/11_2.png) [@Fourdee](https://dietpi.com/forum/u/Fourdee)\
**Post date:** [8 May 2018 19:54 UTC](https://dietpi.com/forum/t/etc-apt-sources-list/2244/2 "2018-05-08T19:54:35Z")

</div>

sources fine, see below:

```nohighlight
deb http://ftp.debian.org/debian/ stretch main contrib non-free
deb http://ftp.debian.org/debian/ stretch-updates main contrib non-free
deb https://deb.debian.org/debian-security/ stretch/updates main contrib non-free
deb http://ftp.debian.org/debian/ stretch-backports main contrib non-free

```

Issue with with the corrupt cache, try purging it:

```nohighlight
apt-get clean
rm -R /var/lib/apt/lists/* -vf

```

Then update APT again.

---

<div class="post-metadata">

**Author:** ![WarHawk](https://dietpi.com/forum/user_avatar/dietpi.com/warhawk/32/21_2.png) [@WarHawk](https://dietpi.com/forum/u/WarHawk)\
**Post date:** [9 May 2018 01:01 UTC](https://dietpi.com/forum/t/etc-apt-sources-list/2244/3 "2018-05-09T01:01:41Z")

</div>

Mine is a custom build of Dietpi from armbian stretch image for Orange Pi Zero…I ran the upgrade from 6.6 to 6.7…  
No worries on helping/troubleshooting (I know non-standard build problems and trying to troubleshoot are almost impossible)…if worse comes to worse I will just rebuild from scratch with the 6.7 as default DIEPI\_PREP build

```nohighlight
# apt-get update
Get:1 http://deb.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:2 http://ftp.debian.org/debian stretch InRelease
Get:3 http://ftp.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:4 http://apt.armbian.com stretch InRelease [18.2 kB]
Get:5 http://ftp.debian.org/debian stretch-backports InRelease [91.8 kB]
Get:6 http://ftp.debian.org/debian stretch Release [118 kB]
Get:7 http://ftp.debian.org/debian stretch Release.gpg [2,434 B]
Get:8 http://deb.debian.org/debian-security stretch/updates/main armhf Packages [360 kB]
Get:9 http://deb.debian.org/debian-security stretch/updates/main Translation-en [165 kB]
Get:10 http://deb.debian.org/debian-security stretch/updates/contrib armhf Packa ges [1,784 B]
Get:11 http://apt.armbian.com stretch/main armhf Packages [211 kB]
Get:12 http://deb.debian.org/debian-security stretch/updates/contrib Translation -en [1,759 B]
Get:13 http://deb.debian.org/debian-security stretch/updates/non-free armhf Pack ages [1,268 B]
Get:14 http://deb.debian.org/debian-security stretch/updates/non-free Translatio n-en [481 B]
Get:15 http://ftp.debian.org/debian stretch-updates/main armhf Packages [10.9 kB]
Get:16 http://ftp.debian.org/debian stretch-updates/main Translation-en [6,782 B]
Get:17 http://apt.armbian.com stretch/stretch-utils armhf Packages [4,743 B]
Get:18 http://apt.armbian.com stretch/stretch-desktop armhf Packages [1,543 B]
Get:19 http://ftp.debian.org/debian stretch-backports/main armhf Packages [298 k B]
Get:20 http://ftp.debian.org/debian stretch-backports/main Translation-en [226 k B]
Get:21 http://ftp.debian.org/debian stretch-backports/contrib armhf Packages [5, 700 B]
Get:22 http://ftp.debian.org/debian stretch-backports/contrib Translation-en [5, 877 B]
Get:23 http://ftp.debian.org/debian stretch-backports/non-free armhf Packages [4 ,884 B]
Get:24 http://ftp.debian.org/debian stretch-backports/non-free Translation-en [2 4.1 kB]
Get:25 http://ftp.debian.org/debian stretch/main armhf Packages [6,950 kB]
Get:26 http://ftp.debian.org/debian stretch/main Translation-en [5,394 kB]
Get:27 http://ftp.debian.org/debian stretch/contrib armhf Packages [42.0 kB]
Get:28 http://ftp.debian.org/debian stretch/contrib Translation-en [45.9 kB]
Get:29 http://ftp.debian.org/debian stretch/non-free armhf Packages [59.6 kB]
Get:30 http://ftp.debian.org/debian stretch/non-free Translation-en [80.1 kB]
Fetched 14.3 MB in 50s (283 kB/s)
Reading package lists... Error!
E: Unable to parse package file /var/lib/dpkg/status (1)
W: You may want to run apt-get update to correct these problems
E: The package cache file is corrupted

```

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [11 May 2018 11:16 UTC](https://dietpi.com/forum/t/etc-apt-sources-list/2244/4 "2018-05-11T11:16:27Z")

</div>

WarHawk  
Please try to comment the armbian repo, as your Debian repos look fine. The related file should be located within /etc/apt/sources.list.d/. Comment out the deb line(s) inside and try if apt update runs through then, in case after doing the clean steps provided by Fourdee.

If it doesn’t help, I see you switched from default repo mirrordirector ([deb.debian.org](http://deb.debian.org)) to [ftp.debian.org](http://ftp.debian.org) already. The security repo is not affected by this, as different mirrors have it available via different URL scheme or not at all. Please try to adjust the remaining [deb.debian.org](http://deb.debian.org) line within /etc/apt/sources.list and replace by:

```nohighlight
deb http://security.debian.org/debian-security stretch/updates main contrib non-free

```

---

<div class="post-metadata">

**Author:** ![WarHawk](https://dietpi.com/forum/user_avatar/dietpi.com/warhawk/32/21_2.png) [@WarHawk](https://dietpi.com/forum/u/WarHawk)\
**Post date:** [14 May 2018 03:17 UTC](https://dietpi.com/forum/t/etc-apt-sources-list/2244/5 "2018-05-14T03:17:08Z")

</div>

Thanks!

Will give it a shot asap
