How to uninstall Qt5?
Asked Answered
B

5

20

Somehow I ended up with 2 versions of Qt on my Ubuntu 14.04 LTS machine, Qt4 and Qt5. Here is the output of qtchooser -list-versions

4
5
config
default
qt4-i386-linux-gnu
qt4-x86_64-linux-gnu
qt4
qt5-x86_64-linux-gnu
qt5

How do I remove Qt5?

Biggin answered 21/9, 2016 at 19:50 Comment(0)
C
23
  1. Open a terminal and navigate to the directory where Qt is installed.
  2. Run the command ./MaintenanceTool.
Chalcidice answered 13/3, 2018 at 21:8 Comment(0)
P
16

From The Terminal:

1. Remove the package:
sudo apt-get remove qtcreator && sudo apt-get remove qt5*
2. Remove all the dependencies:
sudo apt-get purge qtcreator && sudo apt-get purge qt5*

3. Remove the unneeded packages that were once installed as a dependency:

sudo apt-get autoremove
4. Remove the retrieved packages from the local cache:
sudo apt-get autoclean

From the GUI:

  1. Open Qt Maintenance Tool Qt Maintenance Tool

  2. Tick Uninstall Uninstall

  3. Click next, then Uninstall enter image description here

  4. Enter the Sudo password if requested then, press Finish.

Pentameter answered 8/12, 2021 at 21:41 Comment(1)
The command line instructions finally helped me get rid of the qmake installed by the qt5 packages supported in Ubuntu 20.04. Thanks. I needed to go back to the exact same qt5 versions I had in Ubuntu 18.04Merilyn
B
11

If you want to remove/uninstall Qt Creator then follow this:

Open your terminal (Ctrl + Alt + T), then...

  1. To only uninstall Qt Creator:

    sudo apt-get remove qtcreator

  2. If you want to remove Qt Creator and its dependent packages as well:

    sudo apt-get remove --auto-remove qtcreator

Reference website: https://www.thelinuxfaq.com/ubuntu/ubuntu-17-04-zesty-zapus/qtcreator?type=uninstall

Borchers answered 23/5, 2021 at 14:19 Comment(0)
A
7

Just remove the Qt5 dev packages, that should do it:

sudo apt autoremove '.*qt5.*-dev'

Inspect the shown list of packages to be removed carefully before hitting yes, though! If there are some you want to keep, do apt install for them to mark them manually installed.

Accede answered 21/9, 2016 at 19:58 Comment(4)
I would like to remove all Qt form my ubuntu-16.04, how can I achieve that?Kinkajou
After doing this I still see Qt 4 and 5 both in qtchooser -list-versionsTemperament
@UrviG As a guess, you still have both qmake's. Perhaps you have marked them manually installed at some point, so they didn't get removed. Inspect list of installed packages.Accede
Thanks @Accede This is the output for that command. 4 5 default qt4-x86_64-linux-gnu qt4 qt5-x86_64-linux-gnu qt5 I only intend to completely wipe off QT, on this system(ubuntu 16.04) previously different versions of QT are installed and start all over again..Can I proceed despite this output?Temperament
E
3
  1. Where is your qtchooser configuration file?

    $: locate qtchooser | grep conf

  2. From the list of conf files, probably there is one call "default.conf". This one is a link to one of the others (4.conf or qt4.conf or 5.conf or qt5.conf). Choose the one that makes sense to you, and create a link to it.

    Suppose your default file path is /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf.

    Create a backup:

    $: cd $(dirname /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf)
    $: cp -av default.conf default.conf_backup
    

    Let's say your target is /usr/lib/x86_64-linux-gnu/qtchooser/qt5.conf, then:

    $: sudo ln -s /usr/lib/x86_64-linux-gnu/qtchooser/qt5.conf default.conf
    
  3. Is the path to your qmake right?

    Check the qmake location:

    $: locate qmake | grep bin
    

    Is this the same one as indicated in your modified qtchooser/default.conf?

    $: cat /usr/lib/x86_64-linux-gnu/qtchooser/qt5.conf
    

    If the answer is yes, then you are done. If the answer is no, then you need to modify the file:

    Create a backup:

    $: cd $(dirname /usr/lib/x86_64-linux-gnu/qtchooser/qt5.conf)
    $: cp -av qt5.conf qt5.conf_backup
    

    Edit the file and change the path to your qmake location:

    $ sudo vi qt5.conf
    

    Now it is done.

Empirical answered 17/4, 2018 at 20:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.