
I use aptitude as a package manager. I'm running out of disk space. aptitude doesn't show anything needing to be removed. apt-get -s auto-remove shows just about every package in this range and offers to remove them linux-image-4.4.0-10-generic to linux-image-4.4.0-89-generic linux-headers-4.4.0-10-generic to inux-headers-4.4.0-89-generic In total there is 146 files (about 2GB) that apt-get would delete. An attempt to remove with aptitude shows nothing to remove sudo aptitude -s -oAptitude::Delete-Unused=1 install Check with aptitude as to why they are installed and all of them gives the same answer. aptitude why linux-image-4.4.0-15-generic i A linux-image-4.4.0-15-generic Provides zfs-dkms So is it safe to get rid of these files with apt-get auto-remove or will it mess up aptitude? -- Stripes Theotoky -37 .713869 145.050562

On Tuesday, 22 August 2017 4:06:37 AM AEST stripes theotoky via luv-main wrote:
I use aptitude as a package manager. I'm running out of disk space.
How much disk space is in use and how much do you have? Hard drives keep getting bigger, nowadays it's hard to give away disks smaller than 500G. A large Debian installation is around 6G.
apt-get -s auto-remove shows just about every package in this range and offers to remove them linux-image-4.4.0-10-generic to linux-image-4.4.0-89-generic linux-headers-4.4.0-10-generic to inux-headers-4.4.0-89-generic In total there is 146 files (about 2GB) that apt-get would delete.
An attempt to remove with aptitude shows nothing to remove sudo aptitude -s -oAptitude::Delete-Unused=1 install
Check with aptitude as to why they are installed and all of them gives the same answer.
aptitude why linux-image-4.4.0-15-generic i A linux-image-4.4.0-15-generic Provides zfs-dkms
So is it safe to get rid of these files with apt-get auto-remove or will it mess up aptitude?
Well if you remove all kernels you are probably going to have a problem. But if you remove all but the most recent then it will probably be ok. Which is it doing? I'm running Debian/Unstable on my laptop and due to some issues of dependencies etc "apt-get autoremove" wants to remove many KDE packages right now which isn't what I want. Also due to conflicts it wants to remove them if I run "apt-get dist-upgrade". This sort of thing sometimes happens in Unstable when libraries are being updated, so I just have to not upgrade my laptop until all the necessary packages are rebuilt to depend on new libraries. It's the sort of thing that happens when you run Unstable. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/

On Tue, Aug 22, 2017 at 02:49:34PM +1000, russell@coker.com.au wrote:
On Tuesday, 22 August 2017 4:06:37 AM AEST stripes theotoky via luv-main wrote:
I use aptitude as a package manager. I'm running out of disk space.
How much disk space is in use and how much do you have? Hard drives keep getting bigger, nowadays it's hard to give away disks smaller than 500G. A large Debian installation is around 6G.
It could be apt-get's download cache taking up a lot of disk space. It doesn't clear out downloaded files unless you tell it to. AFAICT from the man page, the same is true for aptitude - not surprising, they both use the same download cache dir to download .deb files to. try 'du -sch /var/cache/apt/archives' and if there's a lot of files in there, run 'apt-get clean' 'aptitude clean' will also work.
Well if you remove all kernels you are probably going to have a problem. But if you remove all but the most recent then it will probably be ok. Which is it doing?
it's safe to remove all linux-image-* and linux-header-* packages except for the currently running kernel, which may or may not be the latest kernel package installed (depending on whether you've rebooted or not since upgrading it). apt-get (actually, dpkg IIRC) will warn you if you try to uninstall the currently running kernel. If your running kernel was auto-installed due to a dependancy, mark it as manually installed with 'apt-mark manual linux-image-VERSION', so that it doesn't get removed if you run 'apt-get autoremove'
I'm running Debian/Unstable on my laptop and due to some issues of dependencies etc "apt-get autoremove" wants to remove many KDE packages right now which isn't what I want. Also due to conflicts it wants to remove them if I run "apt-get dist-upgrade". This sort of thing sometimes happens in Unstable when libraries are being updated, so I just have to not upgrade my laptop until all the necessary packages are rebuilt to depend on new libraries. It's the sort of thing that happens when you run Unstable.
apt-get upgrade is useful in that situation - it only upgrades packages that WON'T require another package to be removed. marking packages as held is also useful. I used to use my own script 'dpkg-hold' for this but 'apt-mark' (which didn't exist when i write dpkg-hold) works better. craig -- craig sanders <cas@taz.net.au>

On Wednesday, 23 August 2017 11:32:27 AM AEST Craig Sanders via luv-main wrote:
Well if you remove all kernels you are probably going to have a problem. But if you remove all but the most recent then it will probably be ok. Which is it doing?
it's safe to remove all linux-image-* and linux-header-* packages except for the currently running kernel, which may or may not be the latest kernel package installed (depending on whether you've rebooted or not since upgrading it).
apt-get (actually, dpkg IIRC) will warn you if you try to uninstall the currently running kernel. If your running kernel was auto-installed due to a dependancy, mark it as manually installed with 'apt-mark manual linux-image-VERSION', so that it doesn't get removed if you run 'apt-get autoremove'
From a discussion off-list we determined that the OP had apt-get working as desired in that regard, it wanted to remove old kernels and wasn't going to touch the one that was running. This is as expected.
I'm running Debian/Unstable on my laptop and due to some issues of dependencies etc "apt-get autoremove" wants to remove many KDE packages right now which isn't what I want. Also due to conflicts it wants to remove them if I run "apt-get dist-upgrade". This sort of thing sometimes happens in Unstable when libraries are being updated, so I just have to not upgrade my laptop until all the necessary packages are rebuilt to depend on new libraries. It's the sort of thing that happens when you run Unstable. apt-get upgrade is useful in that situation - it only upgrades packages that WON'T require another package to be removed.
Thanks for that tip.
marking packages as held is also useful. I used to use my own script 'dpkg-hold' for this but 'apt-mark' (which didn't exist when i write dpkg-hold) works better.
My latest thing is to build some custom packages for this. I have packages etbe-mon, etbe-kvm, etbe-desktop, and etbe-base. This aren't packages I'm ever going to support (but I may make them available on a private apt repository and people will have the ability to use them if they wish) and definitely not suitable for uploading to Debian. But it makes it handy to suck all dependencies in on install and keep them installed. This isn't for everyone, but it's not THAT hard to do either. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/
participants (3)
-
Craig Sanders
-
Russell Coker
-
stripes theotoky