When I had two Debians installed on my drive, I created a debian folder in my data drive, in that folder I created a "apt" folder and a "list" folder. In the apt folder I created the "archives" folder and in that the "partial" folder and a lock file to mimic everything in the /var/cache/apt directory of the root partitions. In the lists folder I created a lock file and copied all lists files from /var/lib/apt/lists to the data/debian/lists folder. My data drive is mounted through /etc/fstab to my home directory in each Debian, so I then deleted the /var/cache/apt and /var/lib/apt/lists directories in each Debian root partitions and soft linked those new directories in the data drive back to the root partitions in each Debian with commands:
Code:
ln -s /home/jo/Data/debian/apt /var/cache/apt
ln -s /home/jo/Data/debian/lists /var/lib/apt/lists
Then I ran command:
apt-cache stats to create the pkgcache.bin and srcpkgcache.bin files in the new /home/jo/Data/debian/apt directory.
Now both Debians share the same cache and lists directories, when I update and upgrade one Debian, all packages are in the cache and lists are updated, then I just do the upgrade in the other Debian which typically don't need to download anything because all packages are already in the cache and the lists are already updated.
I did this to reduce the amounts of writes to the SSD drive where the Debians are installed, now all the constant writing involved with updating Debian testing (which has lots of updates constantly) happens on the HDD data drive, and packages only need be downloaded once.
Reason I mention this, is that it's better to soft link shared directories rather than use persistence. With persistence, files don't get deleted, they are marked as deleted and eventually the persistence becomes full. Many folks who have maxed out their persistence on USB keys have reported the key was non-functional and beyond repair when this happens.