• 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

Using Linux Terminal How To Get Total Disk Size In GB

Count And Find Number Of Files In A Linux Directory Using Command

Check How Many Users Are Created In Linux Ubuntu

How To Check User Permissions In Linux Using Command

Check Which Folder Is Taking More Space In Ubuntu Linux

How to Install Claude Desktop App in Ubuntu Linux

Job Scheduling Using At Command In Linux With Examples

How To Check Permissions Of A Directory In Linux Command

Delete Directory And Contents Recursively Without Prompt On Linux

Check User Login History In Ubuntu Linux Command Line

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

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