I was trying to get a package size installed on my Ubuntu-VM and so I tried 2 different commands: dpkg-query and apt-cache. I did that for 2 packages I previously installed: git and terminator:
For git package:
1. $ dpkg-query -Wf '${Installed-Size}\t${Package}\n' | grep git
Output:
69 elpa-git-commit
1446 elpa-magit
94 elpa-magit-popup
35680 git
1233 git-cvs
864 git-daemon-run
11263 git-doc
...
while
2. $ apt-cache show git | grep '^Size:'
Output:
Size: 4554416
Size: 4553836
For terminator package:
3. $ dpkg-query -Wf '${Installed-Size}\t${Package}\n' | grep terminator
Output: 2099 terminator
while
4. $ apt-cache show terminator| grep '^Size:'
Output: Size: 313088
So I got a little confused. My questions:
- Why dpkg-query on "git" gives so many packages (containing the word 'git') while apt-cache on "git" gives ONLY 2 simple results (probably for 2 different versions)
- Why dpkg-query on "terminator" gives a different size than apt-cache on "terminator" package?
dpkg -s git | grep Size
... and the reply isInstalled-Size: ......