When running apt update as user, the following problems appear:
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied) W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
Thus one needs a local version of the lists and the cache - by standard both with read access available, yet no writing allowed. With apt-config dump one will see a list of available options and how to modify them. The relevant ones are these:
Dir::State "var/lib/apt"; Dir::State::lists "lists/"; Dir::Cache "var/cache/apt"; Dir::Cache::archives "archives/"; Dir::Cache::srcpkgcache "srcpkgcache.bin";
- Copy lists and cache to local directory
mkdir /home/user/apt_local cp -r /var/lib/apt/list /home/user/apt_local/lists cp -r /var/cache/apt /home/user/apt_local/cache
- run
apt with modified directories
apt update -o DIR::State::lists=/home/user/apt_local/lists -o DIR::Cache=/home/user/apt_local/cache apt list --upgradable -o DIR::State::lists=/home/user/apt_local/lists -o DIR::Cache=/home/user/apt_local/cache
Of course that easily means a local copy of some 200 MB, and one would have to always make a copy of the latest state to get proper answers.