On Thu, 2022-08-11 at 18:08 +0200, Wolfgang Engelmann wrote:
> Am 11.08.22 um 14:28 schrieb Dr Eberhard Lisse:
> > for i in lyx lyx240 lyx24n lyx24x
> > do
> >          rm -rf $(realpath $(which $i))
> > done
> > 
> > el
> > 
> > 
> > 
> Thanks, El,
> but I do not know how to apply this script.
> How do I find the realpath of my installed lyx's?
> I checked the help files of lyx, but couldn't find a description of how 
> to uninstall a lyx file and all the stuff going with it.
> Wolfgang

Hi Wolfgang,

What El wrote is a shellscript. Shellscripts can't be used on Windows unless you
have Linux For Windows or Windows Posix or whatever. "realpath" is an actual
shellscript command that resolves the true path/filename regardless of symlinks.

So basically, for every directory name listed on the "for" line, delete the real
filenamename associated with the first occurence of the list item that occurs 
on the executable path.

I'm personally not a fan of mass deletion inside a shellscript. If it were me, 
substitute the line currently saying rm -rf $(realpath $(which $i)) with:

echo $(realpath $(which $i))

That should give you a list of the true filenames to delete. I'd then check 
each one
before deleting it manually.

Also, if these are just executables and you installed them via a package from 
distribution, the executables will "come back" the next time you get an update 
the particular version. But I don't know your situation.


lyx-users mailing list

Reply via email to