0

I want to force caching the installed packages with apt-get install (apt install) in /var/cache/apt. Currently, I found some of them are cached, but most of them are not. I want to cache all of them to install them on another machine by copying these packages without downloading them again from the Internet, especially for large packages which cost a lot of time.

2

1 Answer 1

1

I think that setting up your local machine as a repository would be a better option, but if you want to just download a package you can run:

sudo apt install -d package

If you want to cache all of your installed packages you can run

sudo apt install -d $(apt list --installed | cut -d'/' -f 1 | grep -v "Listing..." | tr '\n' ' ')

Not the answer you're looking for? Browse other questions tagged .