On 2017-09-07 17:07 +0200, Urs Thuermann wrote: > After fully updating my jessie system using > > aptitude update; aptitude full-upgrade > > I edited sources.list to dist-upgrade to strech. A folloing aptitude > upgrade wants to install additional 1.5 GB on my system which is > currently ~5 GB, i.e. a 30% increase: > > # df -h / /usr > Filesystem Size Used Avail Use% Mounted on > /dev/dm-0 2.0G 1.8G 135M 93% / > /dev/dm-2 7.8G 4.4G 3.0G 60% /usr > # du -hs /root > 1.4G /root > # aptitude upgrade > Resolving dependencies... > ... > The following NEW packages will be installed: > btrfs-progs{a} clang-3.8{a} cpp-6{a} cpp-6-doc{a} dh-autoreconf{a} > ... > The following packages will be REMOVED: > cpp-4.9-doc{u} docutils-common{u} docutils-doc{u} g++-4.9{u} > gir1.2-vte-2.90{u} > ... > The following packages will be upgraded: > acct acl acpi acpi-support-base acpid adduser adwaita-icon-theme apache2 > ... > 1151 packages upgraded, 297 newly installed, 128 to remove and 82 not > upgraded. > Need to get 1843 MB of archives. After unpacking 1537 MB will be used. > Do you want to continue? [Y/n/?] > > I see that some new versions of packages are installed without the old > versions being removed, although they are marked as automatically > installed, e.g. Linux kernel, clang, llvm, and some others. For > example > > # aptitude search "~i clang" > i clang - C, C++ and Objective-C compiler (LLVM based) > i A clang-3.5 - C, C++ and Objective-C compiler (LLVM based) > i A libclang-common-3.5-dev - clang library - Common development package > i A libclang1-3.5 - C interface to the clang library > > and aptitude full-upgrade will install clang-3.8 but not remove > clang-3.5.
This happens because clang-3.5 and gcc-4.9 provide the c-compiler virtual package which is a dependency/recommendation of quite a few packages (usually via an alternative: gcc | c-compiler). Apt does not autoremove such packages since they are not unused. This was once convincingly explained to me by aptitude's creator[1]. > But my suspicion is that even when I manually remove all > these old packages, the installation is still unreasonably larger than > it is currently. Quite possibly. The -Z and -D flags can help you to identify the biggest offenders and why they are pulled in. Cheers, Sven 1. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477166#16