Skip to main content

Posts

Showing posts from May, 2015

Find size of package in Ubuntu before downloading it via command line

It is better to know the size of a package before downloading it. At times, apt-get install prompts before downloading the package and we can read the size there. However sometimes dependencies are downloaded and then there is a prompt for the BIG package. But by now some packages are already installed and if the BIG package is rejected because of slow bandwidth etc. an extra effort is to be made to clean the unnecessary packages too.( apt-get autoremove does it too. But, it is extra effort after all)   What we can do is this, apt-cache --no-all-versions show $package | grep '^Size: '   E.g: apt-cache --no-all-versions show qtoctave | grep '^Size: ' Size: 3891520 The size is in bytes. Ubunut Version: 12.04 LTS