[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: reinstalling Nginx & others usin apt from command line



On Thu, Oct 10, 2013 at 11:23:50PM +0200, berenger.morel@neutralite.org wrote:
> Maybe you, since you know how it works. But, someone with no
> knowledge would think that it also removes userland configuration
> files, since it claims to remove all configuration files.

Ok, since the man page is saying one thing, and yourself and Brad are
saying another, I decided to try this out. Here's what I did:

1. apt-get install apcupsd

2. Edit /etc/apcupsd/onbattery. Towards the end of that file is a line
   that says:

/sbin/apcaccess

Let's pretend I don't want a status report from the ups if power
fails, so I changed it to say:

#/sbin/apcaccess

and saved the file.

3. apt-get purge apcupsd

4. ls /etc/apcupsd

"ls: cannot access /etc/apcupsd: No such file or directory"

5. apt-get install apcupsd

The file /etc/apcupsd/onbattery is back of course, and the line I
commented out isn't commented anymore, which is what I would
expect. It's exactly as the man page says, any configuration files
will be deleted! If what you have in mind is a user creating a file
which apt knows nothing about, then that's a different case. I agree
with Jerry here, it isn't reasonable to expect apt to know about a
file which it didn't create, so that file naturally wouldn't be purged
when the package got removed. In fact, I seem to recall that in such a
situation dpkg gives a warning stating something along the lines of
directory xyz not empty, so not removed. So, even if a user forgets
he/she created a file or files or something like dkms created a kernel
module for example, dpkg tries to remind you about that when a package
is purged, and a given directory could have been purged too if you
hadn't put something there.

If I'm missing something here then perhaps it would be useful if
you/Brad/someone else
provided an example illustrating your point as I did to illustrate
mine.

Greg


-- 
web site: http://www.gregn..net
gpg public key: http://www.gregn..net/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)

--
Free domains: http://www.eu.org/ or mail dns-manager@EU.org


Reply to: