Sample Header Ad - 728x90

Debian script to download source of installed packages fails

1 vote
1 answer
958 views
I used the next script from askububtu to automate the download of all installed packages in a fresh debian 9.3 LXDE installation. From here: #!/bin/bash dpkg --get-selections | while read line do package=echo $line | awk '{print $1}' mkdir $package cd $package apt-get -q source $package cd .. done My problem is that I get some errors and it downloads a similar but not the wanted package: > sh: 1: dpkg-source: not found > W: Download is performed unsandboxed as root as file > 'libreoffice_5.2.7-1.dsc' couldn't be accessed by user '_apt'. - > pkgAcquire::Run (13: Permission denied) E: Unpack command 'dpkg-source > --no-check -x libreoffice_5.2.7-1.dsc' failed. Reading package lists... Picking 'libreoffice' as source package instead of > 'libreoffice-calc' You can imagine that it downloads 300MB or so every 3-4 minutes (libreoffice) for many times (for almost every dependency of libreoffice)... Does anyone has a better suggestion than that script to automate the source download of the packages used on my system?
Asked by koleygr (355 rep)
Feb 10, 2018, 08:02 PM
Last activity: May 22, 2024, 09:09 AM