[SOLVED] Slackpkg equivalent of "purge" in aptitude
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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 */
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.
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).
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.
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* :
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.