WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: sce-debpurge  (Read 2820 times)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
sce-debpurge
« on: May 27, 2015, 12:18:08 PM »
Right now I am aiming to make a tool that will delete deb packages in the import/debs directory that are not referenced by one's current entries in their debinx* files.  I saw I had 7 differenct iceweasel debs in mine, and a tool to run one command to only keep what will be currently used I think will be helpful.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: sce-debpurge
« Reply #1 on: May 27, 2015, 01:46:54 PM »
great idea, i did that manually :-)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: sce-debpurge
« Reply #2 on: May 31, 2015, 08:01:52 PM »
It's put into place, works for .deb packages, tar.gz prebuilt ones, and -data.tar.gz data files.

Offline gwalther

  • Full Member
  • ***
  • Posts: 139
Re: sce-debpurge
« Reply #3 on: June 02, 2015, 06:48:06 PM »
I ran sce-debpurge and it removed some deb's.  I then immediately tried to run it a second time, and it returned an error saying "there is an issue connecting to htp://repo.tinycorelinux.net...exiting.

I repeated this exercise later on a different computer...same result, second attempt fails.


Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: sce-debpurge
« Reply #4 on: June 03, 2015, 08:43:08 AM »
The script downloads

http://repo.tinycorelinux.net/dCore/import/deb2sce.tar.gz

An error downloading that file will produce that error, which means it is a network connection error.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: sce-debpurge
« Reply #5 on: June 07, 2015, 10:12:16 AM »
Code: [Select]
jls@box:~$ sce-debpurge

This tool will remove all non current packages in /etc/sysconfig/tcedir/import/debs?  Do you want to continue? (y/N):y
ubuntu
#################### 100.0% 0.0 kBps DONE

verifying download...checksum matches OK
used 11134976 local, fetched 0
Using the repo http://ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
Using the repo http://ppa.launchpad.net/enlightenment-git/ppa/ubuntu trusty main
Using the repo http://packages.bodhilinux.com/bodhi trusty main
Using the repo http://archive.canonical.com/ubuntu/ trusty partner
Using the repo http://dl.google.com/linux/talkplugin/deb/ stable main
Using the repo http://it.archive.ubuntu.com/ubuntu/ trusty multiverse
Using the repo http://ppa.launchpad.net/pidgin-developers/ppa/ubuntu trusty main
Using the repo http://it.archive.ubuntu.com/ubuntu/ trusty restricted
Using the repo http://www.bchemnet.com/suldr/ debian extra
Using the repo http://security.ubuntu.com/ubuntu trusty-security main
Using the repo http://security.ubuntu.com/ubuntu trusty-security multiverse
Using the repo http://security.ubuntu.com/ubuntu trusty-security restricted
Using the repo http://security.ubuntu.com/ubuntu trusty-security universe
Using the repo http://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt all main
Using the repo http://it.archive.ubuntu.com/ubuntu/ trusty universe
Using the repo http://it.archive.ubuntu.com/ubuntu/ trusty-updates main
Using the repo http://it.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
Using the repo http://it.archive.ubuntu.com/ubuntu/ trusty-updates restricted
Using the repo http://it.archive.ubuntu.com/ubuntu/ trusty-updates universe
Using the repo http://ppa.launchpad.net/whatsapp-purple/ppa/ubuntu trusty main
Using the repo http://it.archive.ubuntu.com/ubuntu/ ubuntu trusty main
There is an issue connecting to http://ftp.vim.org/os/Linux/distr/tinycorelinux, exiting..
jls@box:~$
dCore user

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: sce-debpurge
« Reply #6 on: June 07, 2015, 10:28:16 AM »

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: sce-debpurge
« Reply #7 on: June 07, 2015, 06:27:01 PM »
Now it's working.
I propose to  eliminate the request to proceed since if I launch the command I want to purge and also I propose to show only the  packages that are going to be deleted.
dCore user

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: sce-debpurge
« Reply #8 on: June 07, 2015, 07:49:23 PM »
Ok, I had added the listing of those that were current to show progress, but it makes the output unreadalbe, so I agree.

And, since this deletes files I put in the 'are you sure', if no one else objects I will just remove it as this only deletes stale files anyway.


Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: sce-debpurge
« Reply #9 on: June 07, 2015, 08:19:13 PM »
Ok, done, in git and uploading new cuts.

Also, a list of removed files are listed in /tmp/.debpurged.