LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-11-2013, 09:40 AM   #1
rubankumars
Member
 
Registered: Oct 2010
Location: india
Distribution: debian 8,debian 9,slackware 14.2
Posts: 158

Rep: Reputation: 12
Slackpkg equivalent of "purge" in aptitude


want to know how slackpkg handles config files.are they removed with simple remove option or require any parameters?
Equivalent of purge in slackpkg or any pkg mgmt tool in slackware?
 
Old 02-11-2013, 10:02 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
For a short overview see here.

For an in-depth explanation see there.

To know more if you have Slackware installed: man <command>

Also, all commands are shell scripts, so you can look into them to see how they work.

Main commands are: installpkg, removepkg, upgradepkg, pkgtool, explodepkg, makepkg, slackpkg.

Last edited by Didier Spaier; 02-11-2013 at 02:43 PM.
 
1 members found this post helpful.
Old 02-11-2013, 02:14 PM   #3
maciuszek
Member
 
Registered: Nov 2010
Location: Toronto, Ontario
Distribution: Slackware + FreeBSD
Posts: 165

Rep: Reputation: 40
Upon invoking removepkg (which slackpkg does) you'll see warnings if certain items in the packing list are not removed. You can then just remove them yourself after.. redirect output to a file if your doing mass removes.

Since you're new, don't assume slackpkg to be 'omg holds my hand for everything'; its not comparable to apt.. it's just a simple front for pkgtools.

I personally don't even have it installed and just manually check changelogs (follwing stable), gftp the patches dir and `upgradepkg <dwl location>/*`.. then back up. I think its a good idea to have all source and tarballs backedup(especially if you dont have a complete install like me).

Although, it's probably smart to have slackpkg though, especially for it's template functionally.

/* Side note: of course, this also applies to any other packages you have installed 'unoffical' (slackbuilds.org, your own, ...).

If your curious how people ( well me ), manage their packages i can post my random `bash`ing for you to get an understanding */

Have fun with slack!

Last edited by maciuszek; 02-11-2013 at 02:17 PM.
 
Old 02-11-2013, 02:40 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Now, to answer the actual question: There is no equivalent for the purge option in slackpkg, you have to remove config files yourself.
This is caused by the package managing system's way of handling config files and, IIRC, is not intended to change in the future.
 
1 members found this post helpful.
Old 02-11-2013, 02:47 PM   #5
maciuszek
Member
 
Registered: Nov 2010
Location: Toronto, Ontario
Distribution: Slackware + FreeBSD
Posts: 165

Rep: Reputation: 40
By the way, don't get the wrong idea about slackware.

All maintance is manually, of course there is `slackpkg` and `sbopkg` .. but that's only for their respected repos. if you would like to use software from any other location(ie: gnome -> dropline, mate, ...) these will not suffice:
{
slackpkg only supports 1 mirror and you wont find too many(if any) unofficial repos that have Changelogs and w.e other files slackpkg reads, in the style of mirrors mirroring ftp.slackware.com.
,
sbopkg deals with slackbuild tarballs in the style established by slackbuilds.org.
}

The point i wanted to get across now(and above mentioning i don't use slackpkg) is that in the end what these fronts give is very minimal, implying you should not expect to much and you can do everything with just pkgtools and bash(without too much more effort).
 
Old 02-11-2013, 03:02 PM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by TobiSGD View Post
Now, to answer the actual question: There is no equivalent for the purge option in slackpkg, you have to remove config files yourself.
I do not know about purge, but in my understanding, removepkg will remove all files, including directories and symlinks, that installpkg did install (including configuration files), unless one of following conditions be true:
- have changed since installation,
- (directories) include new files/are not empty,
- are found in another package,
- are not found.

Last edited by Didier Spaier; 02-11-2013 at 03:48 PM. Reason: '/are not empty' added.
 
1 members found this post helpful.
Old 02-11-2013, 03:20 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by Didier Spaier View Post
I do not know about purge, but in my understanding, removepkg will remove all files, including directories and symlinks, that installpkg did install (including configuration files), unless one of following conditions be true:
- have changed since installation,
- (directories) include new files,
- are found in another package,
- are not found.
You are right with that, but installpkg does not install the actual config files, it only installs the .new files. Those are removed/renamed later.
So at least the first condition is true, if the config files are also grouped up in directories the second condition is also true.

For example have a look at the content of /var/log/packages/slackpkg* :
Code:
tobi ~ ☺ $ cat /var/log/packages/slackpkg* |grep etc
etc/
etc/slackpkg/
etc/slackpkg/blacklist.new
etc/slackpkg/slackpkg.conf.new
etc/slackpkg/templates/
 
1 members found this post helpful.
Old 02-11-2013, 03:46 PM   #8
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
I didn't think about that, probably because I didn't have that broader picture in mind. Thanks, Tobi.
 
Old 02-12-2013, 03:58 AM   #9
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
Wouldn't be too hard to do manually with something like:
Code:
cd $ROOT
sed -n -e '/FILE LIST:/,$ {/\.new$/s/\.new$// p} ' "var/log/packages/$PACKAGE" | xargs -r rm -f
removepkg $PACKAGE
Note: this doesn't take account of the fact that a file can be in multiple packages in slackware so it could do with tightening further.

Whether it'd be worth adding a --purge option to removepkg to do something similar or not I don't know, The odd unused config file doesn't do any harm, and it's easy enough to do something like the above yourself if you're really anal about leaving them about.
 
1 members found this post helpful.
Old 02-12-2013, 10:17 AM   #10
maciuszek
Member
 
Registered: Nov 2010
Location: Toronto, Ontario
Distribution: Slackware + FreeBSD
Posts: 165

Rep: Reputation: 40
rubankumars,
Start marking threads as solved
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
debian deb packaging: how to detect "--purge"-switch t0bias Debian 1 06-28-2010 05:24 AM
[SOLVED] How to recover from "slackpkg remove" followed by "installpkg"? catkin Slackware 5 04-29-2010 10:54 AM
Set the status of "purge" packages - dpkg --get-selections kushalkoolwal Debian 7 01-09-2009 11:48 AM
Is there an "apt-get" equivalent of "yum list available"? geeeeky.girl Linux - General 3 07-20-2008 08:40 PM
Feeding the output of "diff" or "cat" command to dpkg --purge kushalkoolwal Debian 9 06-19-2008 07:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration