Monday, February 26, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 2784  / 2 Years ago, sat, december 18, 2021, 6:35:28

When we run apt-get update ubuntu read URLS from /etc/apt/sources.list and package information save in /var/lib/apt/lists.



Can i customize this directories? Without harm /var/apt/lists and /etc/apt/sources.list. When I want to install a package using apt-get it will read package information from a specific directory (/custom/apt/lists) instead of /var/lib/apt/lists and update from /custom/apt/sources.list instead of /etc/apt/sources.list.


More From » apt

 Answers
2

Yes, you can, the two things you are looking for are:




  • The equivalent to /etc/apt/sources.list.d/* is Dir::Etc::SourceParts.

  • The /etc/apt/sources.list equivalent is Dir::Etc::SourceList

  • The /var/lib/apt/lists/ equivalent is Dir::State::Lists



There are a bunch of them in the apt-get man page. An example using all of them:



apt-get update -o Dir::Etc::SourceParts "/some/path/with/lists/" -o Dir::Etc::SourceList "some.list" -o Dir::State::Lists "/custom/apt/lists"

[#28237] Sunday, December 19, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
atetamme

Total Points: 11
Total Questions: 121
Total Answers: 109

Location: Puerto Rico
Member since Sun, Jun 27, 2021
3 Years ago
;