Results 1 to 4 of 4

Thread: Get download size updates via cli

  1. #1
    Join Date
    Feb 2009
    Location
    Netherlands
    Beans
    784

    Get download size updates via cli

    Is there a command to get the download size (and maybe even installed size) of the total available updates? Update manager shows dl size, so that should also be possible via commandline, shouldn't it?

    If there is not a straightforward command then maybe with python it can be retrieved. In /usr/lib/python2.6/dist-packages/apt/cache.py there are definitions that could be useful (requiredDownload and additionalRequiredSpace, lines 141-152). I have no idea though how to turn that knowledge into a python script that prints dl size for current available updates list (python /usr/lib/update-notifier/apt_check.py --print-packages).

    Help is appreciated.

  2. #2
    wojox is offline I Ubuntu, Therefore, I Am
    Join Date
    Apr 2009
    Beans
    8,630

    Re: Get download size updates via cli


  3. #3
    Join Date
    Jul 2005
    Location
    England
    Beans
    Hidden!

    Re: Get download size updates via cli

    Try
    Code:
    sudo apt-get -s install packagename
    or
    Code:
    sudo apt-get -s upgrade
    which will simulate the action you ask for but not do anything, so you will see the size of download without the download happening.

  4. #4
    Join Date
    Feb 2009
    Location
    Netherlands
    Beans
    784

    Re: Get download size updates via cli

    Thanks for replying but the -s flag doesn't show download size. So I need to actually issue the root permission install / upgrade command and answer 'no' to the continue-question (if any) to get the download size? Update manager shows it before I have to enter the password, so I hope someone has an alternative solution.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •