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.
Asked
Active
Viewed 2,171 times
0
Liang Xiao
- 123
1 Answers
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' ' ')
gabmus
- 100
- 1
- 9