Download packages via apt without root privlidges

aptpackage-management

I'm working on a script to show differences between config files on a system and those provided in the original package. I have pretty much all of it working, except for using apt to download packages without being root. Is there a simple way to do this?


Edit: I've looked into the 'hacky' wget scripting type options, but the main issue I have is how you would determine which repo to attempt to get the package from. It's not included in any apt-cache output that I can see.

Best Answer

Simply aptitude download it:

$ ls vim*.deb
ls: vim*.deb: No such file or directory

$ aptitude download vim
[...]
Fetched 835kB in 0s (2933kB/s)

$ ls vim*.deb
vim_1%3a7.0-122+1etch5_amd64.deb

$ id
uid=1000(earl) gid=100(users) groups=100(users)
Related Topic