Search code examples
linuxdebianghdl

How i can remove ghdl 0.29 from Debian?


I follow this steps to install GHDL compiler in my Debian, but now I need to uninstall this compiler to install x64 version, and I can't.

By downloading the binaries and unpacking them manually:

 $ wget http://ghdl.free.fr/site/uploads/Main/ghdl-i686-linux-latest.tar

 $ sudo tar xvf ghdl-i686-linux-latest.tar

(This generates the file ghdl-0.29-i686-pc-linux.tar.bz2)

 $ cd ghdl-0.29-i686-pc-linux

 $ sudo tar -C / -jxvf ghdl-0.29-i686-pc-linux.tar.bz2

(This copy the files to /usr/local/bin and /usr/local/lib)

I have used dpkg --purge ghdl, but if I use ghdl --version, the ghdl 0.29 still in the system.

How can I remove it?


Solution

  • faced the same situation and this is how i did it:

    goto where your tarball is and use this command

    sudo tar -tf ghdl-0.29-i686-pc-linux.tar.bz2 | sed 's/^..//' | parallel sudo rm -rf
    

    explanation:

    • tar -tf ghdl-0.29-i686-pc-linux.tar.bz2 List all files in archive.tar
    • sed 's/^..//' Removes initial directory characters
    • parallel sudo rm -rf removes matching files

    this will leave some empty directories at /usr/local and if you want to get rid of them you can use

    sudo find /usr/local/* -type d -empty -delete