On Thu, 2024-04-11 at 16:46 +0000, mYnDstrEAm wrote: > > For example, I think a good approach to this would be something like > this (if the user is low on root partition disk space): > 1. asking for *at least* 400MB to be available > 2. if a parameter for stepwise is set or it detected low free disk > space: > 3. downloading the first 300 MB or so of packages > 4. installing these > 5. deleting the cached packages from /var/cache/apt/archives/ > 6. downloading the next batch up to the storage limit set at start > 7. and so on (without exiting in-between) >
quick and dirty and not tested: while apt -s upgrade | grep '^Inst' | head -1 | awk '{print $2}' | xargs apt install; do apt clean; done Use head -10 or whatever fits for more/less packages. -- Bernd Zeimetz Debian GNU/Linux Developer http://bzed.de http://www.debian.org GPG Fingerprint: ECA1 E3F2 8E11 2432 D485 DD95 EB36 171A 6FF9 435F