WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: sce-debpurge request to purge no longer needed  (Read 1657 times)

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
sce-debpurge request to purge no longer needed
« on: February 07, 2016, 12:27:27 PM »
sce-debpurge does it's job well for purging deprecated or all. There is, however, no feature to selectively remove DEBs no longer required by any system SCEs.

I come across this a lot with testing, although the feature would be useful for anyone who wants to maintain a long term system (believe Debian Jessie will receive LTS until 2020). Manually removing DEBs that are no longer needed is impractical. Users with bandwidth limitations wouldn't want to  sce-debpurge -a  then have to re-import much of it again during SCE updates. The /debs directory resembles an everything-including-the-kitchen-sink Slackware install after a while.

Jason, if you're not in the mood for adding new features no big deal or put on backburner. Think it would be useful for future development, thanks.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: sce-debpurge request to purge no longer needed
« Reply #1 on: February 07, 2016, 01:49:38 PM »
Is what you are saying you wish the ability to remove deprecated debs one by one perhaps via a select menu?  If that is the case, why keep deprecated debs in the first place.  All debs can be removedby sce-debpurge, or just those that are not going to be possibly used by future sce-import sessions.  Pardon me if I am missing what it is you are talking about.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: sce-debpurge request to purge no longer needed
« Reply #2 on: February 07, 2016, 04:00:40 PM »
Should have given an example, sorry. Nothing manual, too tedious, automatic scan and removal from /debs.

Simplified example, importing nano.sce downloads the following /debs:
dpkg
gcc-4.9-base
libc6
libgcc1
libncursesw5
libtinfo5
nano

Running  sce-remove nano  , removes only /sce/nano.sce*, nothing from /debs.

Running  sce-debpurge  only removes deprecated DEBs. Until these DEBS become deprecated they won't get removed, even if user will never want to re-install nano.

Running  sce-debpurge -a  removes everything, even stuff the user wants to keep for re-imports and updates.

So user may want something like  sce-debpurge -n  to remove all DEBs that are NO longer required by any system SCEs. For nano.sce this may include:
dpkg_1.17.26_i386.deb
gcc-4.9-base_4.9.2-10_i386.deb
libc6_2.19-18+deb8u2_i386.deb
libgcc1_4.9.2-10_i386.deb
libncursesw5_5.9+20140913-1+b1_i386.deb
libtinfo5_5.9+20140913-1+b1_i386.deb
nano_2.2.6-3_i386.deb

To do this manually would be a nightmare, especially figuring out which DEBS other SCEs require. This feature would benefit those with limited drive space, bandwidth issues and/or want to maintain a more pristine installation over a long duration.

As mentioned, nano.sce is a simplified example with only a few dependencies. A better example might be installing Gnome desktop or emacs, decide you'll never want to re-install the software again. Now the only practical way to clean up /debs is with  sce-debpurge -a  , but of course then everything needs to be re-downloaded when updating existing SCEs.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: sce-debpurge request to purge no longer needed
« Reply #3 on: February 07, 2016, 05:05:26 PM »
Ok, so remove anything that is not needed by currently installed SCEs?  If so, will put it on the agenda.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: sce-debpurge request to purge no longer needed
« Reply #4 on: February 07, 2016, 06:07:08 PM »
So when sce-remove, remove the debs that are no longer needed by the SCE that is removed that is also not needed by other SCEs.  If that is the case, got it.  Took me a bit to get what you were saying.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: sce-debpurge request to purge no longer needed
« Reply #5 on: February 07, 2016, 06:26:04 PM »
Guess there's a couple ways to do it, though as per the thread title i meant it as a seperate  sce-debpurge  feature. That way user can scan entire /debs directory and remove everything not required by any SCE, not just related to one specific SCE.

The present  sce-remove  is very fast, i like that, just reboot for SCE to be removed. Purging the DEBs would take longer, so i was thinking a dedicated seperate  sce-debpurge --purge-unneeded  scan that could run in the background. If the DEB removal option gets tied to  sce-remove --all-debs-too  and the user doesn't use the option but later decides he'll never want to re-import that particular software, then the chance to purge the DEBs is gone unless he re-imports the undesired software just to re-run  sce-remove --all-debs-too. Hope that made sense.

Whatever method you feel works best or easiest to incorporate, my preference would be with  sce-debpurge  but i'm not much of a coder :)
« Last Edit: February 07, 2016, 06:38:28 PM by nitram »

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: sce-debpurge request to purge no longer needed
« Reply #6 on: February 07, 2016, 06:56:17 PM »
If above tl;dr in my happy place this would be the  sce-debpurge --help  entry:

'sce-debpurge -n'  Purge all files from /etc/sysconfig/tcedir/import/debs not required by any system SCE.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: sce-debpurge request to purge no longer needed
« Reply #7 on: February 08, 2016, 07:32:08 PM »
Makes sense since being frugal is part of the concept.  In the works.