• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / How To Solve WARNING:root:could not open file ‘/etc/apt

How To Solve WARNING:root:could not open file ‘/etc/apt

By Sourabh / July 18, 2017 Category: How To, Ubuntu

How to solve the error: WARNING:root:could not open file ‘/etc/apt/sources.list’. The sources.list is the list of configured APT data sources and sometimes it show the warning that root:could not open file ‘/etc/apt.

sources.list

sources.list is the list of configured APT data sources. The source list /etc/apt/sources.list is designed to support any number of active sources and a variety of source media. The file lists one source per line, with the most preferred source listed first. The information available from the configured sources is acquired by apt-get update (or by an equivalent command from another APT front-end).

Each line specifying a source starts with type (e.g. deb-src) followed by options and arguments for this type. Individual entries cannot be continued onto a following line. Empty lines are ignored, and a # character anywhere on a line marks the remainder of that line as a comment

Method 1

This happens when the directory /etc/apt/sources.list.d doesn’t have the execute permissions (denoted by x). The permission is needed to open a directory. SO to restore the execute permission, run the command:

sudo chmod +x /etc/apt/sources.list.d

Changing the permissions can also be executed by the following command:

sudo chmod -R 0644 /etc/apt/sources.list.d/

Method 2

You can also work on the sources.list file to renew the configuration:

rm /etc/atp/sources.list.d /etc/atp/sources.list

Also note that sources.list files are in /etc/apt/sources.list.d. So to use it, you will need to make a symbolic link from official-package-repositories.list to the old one. Do this by executing the following command :

sudo ln -s /etc/apt/sources.list.d/official-package-repositories.list /etc/apt/sources.list

Tags: Could Not Open File '/Etc/Apt, Sources.List Kali, Sources.List Ubuntu, Sources.List Ubuntu 14.04, Sources.List Ubuntu 14.10, Sources.List Ubuntu 15.04, Sources.List Ubuntu 15.10, Sources.List Ubuntu 16.04, Sources.List Ubuntu 16.10, Sources.List Ubuntu 17.04, Sources.List Ubuntu 17.10, Ubuntu 14.04 Sources.List, Ubuntu 14.10 Sources.List, Ubuntu 15.04 Sources.List, Ubuntu 15.10 Sources.List, Ubuntu 16.04 Repository List, Ubuntu 16.04 Sources.List, Ubuntu 16.04 Sources.List Default, Ubuntu 16.10 Repository List, Ubuntu 16.10 Sources.List, Ubuntu 16.10 Sources.List Default, Ubuntu 17.04 Sources.List, Ubuntu 17.10 Sources.List, Ubuntu Repository Download, Ubuntu Repository Mirror, Ubuntu Sources.List, Ubuntu Sources.List File, Ubuntu Sources.List Generator, Ubuntu Sources.List Location, Warning:Root:Could Not Open File '/Etc/Apt

Primary Sidebar

Latest Posts

Delete Directory And Contents Recursively Without Prompt On Linux

Check User Login History In Ubuntu Linux Command Line

Use Locate Command To Find File In Linux Terminal By Name

How To Change Terminal Color In Ubuntu Command Line

How To Run Fsck Manually In Linux To Fix Unexpected Inconsistency

How To Fix Broken Packages On Ubuntu From Terminal

Re Execute The Previous Command In Linux Ubuntu Command Line

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap