On Thu, Dec 13, 2018 at 10:20:37AM GMT, Sebastian Benoit wrote:
> I'm cleaning up things on a system, and deleting quite a few packages.
>
> For example cups. Because its no longer needed.
>
> --- -cups-2.2.8p1 -------------------
> You should also run rm -rf /etc/cups/*.conf.O /var/log/cups
> You should also remove /etc/cups/cupsd.conf (which was modified)
> You should also remove /etc/cups/classes.conf (which was modified)
> You should also remove /etc/cups/printers.conf (which was modified)
> You should also remove /etc/cups/subscriptions.conf (which was modified)
> You should also remove /etc/cups/snmp.conf (which was modified)
> You should also run rm -rf /var/cache/cups
> You should also run rm -rf /var/spool/cups
>
> If i want to actually delete all that stuff, thats a lot of copy&paste. Are
> we actually expecting users to do that?
>
> Is there some option that i dont know of to automatically remove all the
> things?
>
> I know it might be dangerous to do that, but copy&paste of tens of commands
> is also easy to mess up.
>
> /B.
>
I second that but am not looking for *exactly* what Sebastian is
interested in.
I'd be fairly happy if, at the end of the delete run (be it single
or multiple packages), I could easily extract all the commands,
i.e. rm, (group|user) del, etc. without having to copy paste it
anywhere and use sed or awk (dangerous!).
To sum it up is there a way, and if not, would there be an interest
to add one, where package deletion can create a shell script template,
which one can then edit, if need be, and/or run it simply with, i.e.:
sh ./pkg_delete_cleanup_template
Using Sebastian's example above, the content of said file could
look something like this:
rm -rf /etc/cups/*.conf.O /var/log/cups
rm /etc/cups/cupsd.conf # (which was modified)
rm /etc/cups/classes.conf # (which was modified)
rm /etc/cups/printers.conf # (which was modified)
rm /etc/cups/subscriptions.conf # (which was modified)
rm /etc/cups/snmp.conf # (which was modified)
rm -rf /var/cache/cups
rm -rf /var/spool/cups
Comments (and their indentation) are optional but might be useful to
some.
Regards,
Raf
No comments:
Post a Comment