8

I just installed a file called SenchaCmd-4.0.2.67-linux-x64.run by executing the following code:

./SenchaCmd-4.0.2.67-linux-x64.run 

Due to a problem I describe in detail here, I decided to uninstall SenchaCmd. However, it is not listed in Ubuntu Software Centre or Synaptic Package Manager.

How do I completely uninstall this program?

Running which, I found the installation location as:

/root/bin/Sencha/Cmd/4.0.1.45/sencha-4.0.1.45 

If I executed rm -rf /root/bin/Sencha will that completely???

2
  • 1
    You can locate that app using command whereis. Commented Feb 1, 2014 at 22:22
  • 1
    Does the run-script have an option for uninstall? Commented Feb 2, 2014 at 11:36

5 Answers 5

9

However, it is not listed in Ubuntu Software Centre or Synaptic Package Manager.

Of course it's not, because that *.run file you installed is not a *.deb package. It's essentially a shell script that puts files somewhere (in your case apperently into /root/bin/Sencha/Cmd/4.0.1.45/sencha-4.0.1.45, which is not a proper location for this purpose). apt, the Ubuntu package manager, has absolutely no idea that this program is even installed and therefore won't be able to remove it.

Installing software this way is therefore IMO always an unclean last-resort approach, and I'd avoid it if at all possible.

How do I completely uninstall this program?

That depends on the program; there is no general way. Try to run the *.run file with parameters like --help and hope that has some kind of uninstall mechanism.

Also look into the installation directory if you find some kind of uninstall script.

If I executed rm -rf /root/bin/Sencha will that completely???

Maybe, maybe not. This again depends on the program - if that script just put all files into /root/bin/Sencha and didn't change anything else on your system, then rm -rf would be enough to remove it completely. Before you try that, look for an uninstall parameter or script as I described before.

5

Go to the installed Sencha directory from a terminal, for example:

/somepath/Sencha/Cmd/4.0.2.267/ 

Make sure there is a file named uninstall there.

Here, type:

$ sudo ./uninstall 

And you are done.

1

Usually Sencha Command gets installed in /home/user/bin in ubuntu. Under that folder you should find something like /home/user/bin/Sencha/Cmd/[version]/ and there you will find an executable file called "uninstall", launch it via terminal or otherwise and it will show the uninstaller window that will proceed to remove everything.

If you changed the installation path just search for the uninstaller wherever you told the setup to place the bin folder.

1

As mentioned by Martin von Wittich in his answer : attempting generic usage requests on the ./<filename>.run --help or -h may provide an uninstall option, although if it does provide you with options, it probably also provides you with install options to define a custom target directory for the installation so it is unlikely that the installer will know where the package is installed.

As mentioned by Amod in his answer : Searching for a uninstall script within the installation directory is probably the better solution to properly uninstalling the package.

If you don't know where it installed to:

  • Normally a <packagename>.desktop file will be created to startup the program.
    • Here we use find to search through you home directories hidden directories only to find this "desktop shortcut"
    • We use grep to filter through the results to show only the files which resemble our package name. (I used "zw" in my case, in your case for Sencha you may want to use "enc" or "sen" or "cha", ...)
:~$ find ~/.[!.]?*/ -iname "*.desktop" | grep -i zw /home/paui/.gnome/apps/Ribbonsoft-ZWCADViewer.desktop /home/paui/.local/share/applications/Ribbonsoft-ZWCADViewer.desktop 
  • Now you would view the contents of this desktop file to see where the executable of the package is, normally the line with Exec or TryExec...
:~$ cat .local/share/applications/Ribbonsoft-ZWCADViewer.desktop | grep -i exe Exec="/home/paui/ZWCADViewer/ZWCADRUN.sh" %F 
  • Now you have located where the executable is /home/paui/ZWCADViewer/ and you can investigate to see if there is an uninstall script there. , note that it may not be called exactly uninstall.sh, could be remove, uninst, install (with option to uninstall) modify,... you will need to investigate. You could filter through for script files to see if you identify something.
:~/ZWCADViewer$ find . -iname "*.sh" ./Uninst.sh ./ZWCADRUN.sh 
  • Last but not least do a scan for any reminents of configuration or cache of the program:
:~$ find /usr/ ~/ /snap/ /var/ /etc/ -path ~/mnt -prune -o -iname "*zwcad*" -print 2> /dev/null /home/paui/.cache/zwsoft/ZWCAD Viewer /home/paui/.local/share/applications/Ribbonsoft-ZWCADViewer.desktop /home/paui/.local/share/mime/packages/ZWCAD-mimetypes.xml /home/paui/.local/share/zwsoft/ZWCAD Viewer /home/paui/.local/share/zwsoft/ZWCAD Viewer/2017/en-US/Support/zwcad.fmp~ /home/paui/.local/share/zwsoft/ZWCAD Viewer/2017/en-US/Support/ZWCADiso.lin /home/paui/.local/share/zwsoft/ZWCAD Viewer/2017/en-US/Support/zwcad.lin /home/paui/.local/share/zwsoft/ZWCAD Viewer/2017/en-US/Support/ZWCAD.pgp /home/paui/.local/share/zwsoft/ZWCAD Viewer/2017/en-US/Support/zwcad.fmp /home/paui/.gnome/apps/Ribbonsoft-ZWCADViewer.desktop 

As you can see the uninstall script, in my case, still left quite a few files in the system which I removed manually.

Extra investigation if no uninstall script exists:

It may be interesting to investigate the .run file to see if any code is embedded within the binary file.

  1. Use less -N <dot-run_filename> to view the file with line numbers
  2. Normally if a script is embedded, probably will be at the begining, Scroll with PageDown till you identify the end of the script and start of binary data.

screenshot of less analysing a binary file with script embedded

  1. Extract this data to a file for analisis head -n 401 <dot-run_filename> > run_install-sh.txt
  2. Open run_install-sh.txt with your text viewer of choice and search for words such as target, path, home, ...
  3. attempt to understand what the script is doing (i.e. has done during installation) and do the inverse.

Best of luck!

0

Depending how you has installed it and the characteristics of the installation only removing the installation path may not remove every trace of the program. There are some that includes their own uninstallation script, some others don't and needs all actions be done manually, some are tricky and you have to observe the complete installation to hunt down all changes.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.