0

I installed ccp4-6.5 by unpacking the tar.bz2 files and installed it by running the BINARY.setup. Now I want to remove it.

The problem is, the package doesn't appear in dpkg --list and when ever I restart my ubuntu, I have to source them again. How can I uninstall any software and what should I do that I don't have to source them again and again.

Merlijn Sebrechts
  • 7,215
  • 1
  • 42
  • 67
JIri
  • 25
  • 2
  • 7
  • 1
    What software and how did you install it? – xangua Jan 19 '16 at 14:37
  • 5
    Possible duplicate of [How can I uninstall software?](http://askubuntu.com/questions/1143/how-can-i-uninstall-software) – Info-Screen Jan 19 '16 at 14:42
  • its a **ccp4-6.5** and I install it by unpacking the tar.bz2 files and installed it by running the BINARY.setup. For this I also have to installed the *c-shell* and later I source the package by running the tcsh and source the package from there and call the program with ccp4i and it works. When ever I resrart my computer I have to again run the tcsh and source again. Should I source before remove them with *purge* command – JIri Jan 19 '16 at 15:13
  • 1
    Possible duplicate of [If I build a package from source how can I uninstall or remove completely?](https://askubuntu.com/questions/87111/if-i-build-a-package-from-source-how-can-i-uninstall-or-remove-completely) – karel Nov 10 '19 at 07:22

1 Answers1

3

EDIT: Understanding now you mean you need to use the "source" command (.) in bash, I thought you meant you needed to recompile from source.

Now that you have identified the package as CCP (which I don't know) please look at this wiki related to CCP, seems to be a known issue that you have to source it every time you want it. Put the source command in your .bashrc (or in your case .cshrc or .tcshrc) and it should work fine, this appears to be expected behavior for CCP.

From the linked wiki (in case the link ever breaks):

(t)csh add the following lines to your ~/.cshrc file:

source /where/I/put/ccp4/setup-scripts/ccp4.setup source /where/I/put/ccp4/setup-scripts/ccp4-others.setup

bash add these lines to your ~/.bashrc file:

. /where/I/put/ccp4/setup-scripts/ccp4.setup . /where/I/put/ccp4/setup-scripts/ccp4-others.setup

The next time you start a terminal CCP4 will be available.

To uninstall it, just go to the directory where it's installed and rm it:

cd to the location of the ccp4 directory (/usr/local? ~?)

being very careful and not as root(!):

rm -rf ccp4

If it's not installed with a package manager in the first place then dpkg is not going to be helpful, as you stated. You just need to delete the directory and remove any related commands from your .tcshrc/.cshrc file, the files that are called every time you start a new terminal

JimLohse
  • 304
  • 2
  • 13
  • 1
    Btw: Flag as dupe would be better than mentioning in an answer. Ok well you can't – Info-Screen Jan 19 '16 at 14:36
  • I assumed that because I am such a newb on this SE site, I don't get a specific option to flag as dupe, so I have flagged for moderator attention good point and thanks! – JimLohse Jan 19 '16 at 14:38
  • Thanks for your reply...this command I have used it before as well, but gives error **ignoring request to remove ccp4-6.5 which isn't installed**. I have installed this software and it works fine but probably the package name is different, and I don't know how to find its package name. Sorry guys I am beginner to linux system. – JIri Jan 19 '16 at 15:26
  • @JIri how did you install it? `apt-get install`, or `dpkg -i` with a downloaded .deb? Or did you compile from source with `make` and `make install` ? – Thomas Ward Jan 19 '16 at 15:35
  • I can't comment on the question, too newb, but I updated my answer, I think this is normal for CCP and you just source it when you need it, added the wiki link to my answer http://ccp4wiki.org/~ccp4wiki/wiki/index.php?title=CCP4_installation hope that helps. – JimLohse Jan 19 '16 at 15:55
  • Also purely for general purposes for other people who are looking to clean up packages and dependencies, this question has a great answer about using `apt-get clean` and --purge to clean up not just packages but all unused dependencies http://askubuntu.com/questions/543864/uninstall-of-software?rq=1 – JimLohse Jan 19 '16 at 16:31
  • @Thoams, I did not install it with `sudo apt-get install` or compile with it command `make`. I installed it by running the `./BINARY.setup`. Then it asked me to install the c-shell as well and I installed the c-shell with `sudo apt-get install csh` and run the tsch and source it there. – JIri Jan 19 '16 at 16:59
  • Just for what it's worth, that's a non-standard way to install that bypasses the package manager, here's a good page that explains the various standard approaches (apt-get for ubuntu, yum for Centos/RedHat/Fedora, rpm/yast for OpenSuse etc.): http://www.control-escape.com/linux/lx-swinstall.html Using a .setup extension, I assume that's just a script and they chose .setup, I have never seen that before in Linux, has a Windows feel to it :) – JimLohse Jan 19 '16 at 17:03
  • 1
    @JImLohse...its not like source it when you need it. it will be a crazy work to source all the packages when you need it. Its better to update your `~/.bashrc` or `~/.cshrc` file and then you don't need to source it again and again. – JIri Jan 19 '16 at 17:22
  • 1
    @JImLohse..thanks for the great answer...it working fine for me now.. – JIri Jan 19 '16 at 17:32
  • @JIri just a little help since I notice you are new on this StackExchange site, if my answer directly applied to your question you can indicate that by answering (clicking the check mark next to the answer) http://askubuntu.com/help/accepted-answer we both get credit and it helps the site improve. You can also earn a "badge" by reading the tour page http://askubuntu.com/tour ... In general I know on StackOverflow it's OK to make this suggestion so before anyone flames me here I couldn't find totally clear guidance in meta.askubuntu.com :) – JimLohse Jan 20 '16 at 04:42