Removing Virtualbox-5.1 in a stuck state












7














I am not new to linux and have had to face the occasional odd package or install situation but this tops all of them. At this point I just want to kill it with fire!



I have Virtualbox-5.1 in a somewhat messed up state. It seems something went wrong when i tried to upgrade to it a couple of months back and I never bothered to investigate.
Ever since trying to install it I get error messages every time I upgrade packages. To be specific:



Running VMs found

VirtualBox is currently running. Please close it and try again. Please note that it can take up to ten seconds for VirtualBox (in particular the VBoxSVC daemon) to finish running.


Now I did the usual ps -aux | grep vbox and ps -aux | grep virtualbox and I can assure you, no vbox processes are running.



I also checked /tmp for any lock files which should be named '.vbox-username-ipc'. It is not there.



I have no idea how i got my system in this state but I would very much like to remove virtualbox without having to reinstall. Any input ?










share|improve this question






















  • That message should be displayed only if a running VBoxSVC process was detected. Please check again and also take care of appropriate capitals.
    – Takkat
    Sep 21 '16 at 7:43










  • no matter the capitalization, no prozess containing "VB", "vb" or "virutalbox" is running.
    – Klaus Steinhauer
    Sep 22 '16 at 4:13










  • That's weird... the virtualbox code responsible for this message checks for pidof VBoxSVC. There is a single report of erroneous settings in /etc/vbox in virtualbox forums but I can't reproduce this.
    – Takkat
    Sep 22 '16 at 6:22










  • I hadn't found that thread before. But: the directory is empty.
    – Klaus Steinhauer
    Sep 23 '16 at 6:37


















7














I am not new to linux and have had to face the occasional odd package or install situation but this tops all of them. At this point I just want to kill it with fire!



I have Virtualbox-5.1 in a somewhat messed up state. It seems something went wrong when i tried to upgrade to it a couple of months back and I never bothered to investigate.
Ever since trying to install it I get error messages every time I upgrade packages. To be specific:



Running VMs found

VirtualBox is currently running. Please close it and try again. Please note that it can take up to ten seconds for VirtualBox (in particular the VBoxSVC daemon) to finish running.


Now I did the usual ps -aux | grep vbox and ps -aux | grep virtualbox and I can assure you, no vbox processes are running.



I also checked /tmp for any lock files which should be named '.vbox-username-ipc'. It is not there.



I have no idea how i got my system in this state but I would very much like to remove virtualbox without having to reinstall. Any input ?










share|improve this question






















  • That message should be displayed only if a running VBoxSVC process was detected. Please check again and also take care of appropriate capitals.
    – Takkat
    Sep 21 '16 at 7:43










  • no matter the capitalization, no prozess containing "VB", "vb" or "virutalbox" is running.
    – Klaus Steinhauer
    Sep 22 '16 at 4:13










  • That's weird... the virtualbox code responsible for this message checks for pidof VBoxSVC. There is a single report of erroneous settings in /etc/vbox in virtualbox forums but I can't reproduce this.
    – Takkat
    Sep 22 '16 at 6:22










  • I hadn't found that thread before. But: the directory is empty.
    – Klaus Steinhauer
    Sep 23 '16 at 6:37
















7












7








7


1





I am not new to linux and have had to face the occasional odd package or install situation but this tops all of them. At this point I just want to kill it with fire!



I have Virtualbox-5.1 in a somewhat messed up state. It seems something went wrong when i tried to upgrade to it a couple of months back and I never bothered to investigate.
Ever since trying to install it I get error messages every time I upgrade packages. To be specific:



Running VMs found

VirtualBox is currently running. Please close it and try again. Please note that it can take up to ten seconds for VirtualBox (in particular the VBoxSVC daemon) to finish running.


Now I did the usual ps -aux | grep vbox and ps -aux | grep virtualbox and I can assure you, no vbox processes are running.



I also checked /tmp for any lock files which should be named '.vbox-username-ipc'. It is not there.



I have no idea how i got my system in this state but I would very much like to remove virtualbox without having to reinstall. Any input ?










share|improve this question













I am not new to linux and have had to face the occasional odd package or install situation but this tops all of them. At this point I just want to kill it with fire!



I have Virtualbox-5.1 in a somewhat messed up state. It seems something went wrong when i tried to upgrade to it a couple of months back and I never bothered to investigate.
Ever since trying to install it I get error messages every time I upgrade packages. To be specific:



Running VMs found

VirtualBox is currently running. Please close it and try again. Please note that it can take up to ten seconds for VirtualBox (in particular the VBoxSVC daemon) to finish running.


Now I did the usual ps -aux | grep vbox and ps -aux | grep virtualbox and I can assure you, no vbox processes are running.



I also checked /tmp for any lock files which should be named '.vbox-username-ipc'. It is not there.



I have no idea how i got my system in this state but I would very much like to remove virtualbox without having to reinstall. Any input ?







virtualbox uninstall






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 21 '16 at 6:39









Klaus SteinhauerKlaus Steinhauer

3815




3815












  • That message should be displayed only if a running VBoxSVC process was detected. Please check again and also take care of appropriate capitals.
    – Takkat
    Sep 21 '16 at 7:43










  • no matter the capitalization, no prozess containing "VB", "vb" or "virutalbox" is running.
    – Klaus Steinhauer
    Sep 22 '16 at 4:13










  • That's weird... the virtualbox code responsible for this message checks for pidof VBoxSVC. There is a single report of erroneous settings in /etc/vbox in virtualbox forums but I can't reproduce this.
    – Takkat
    Sep 22 '16 at 6:22










  • I hadn't found that thread before. But: the directory is empty.
    – Klaus Steinhauer
    Sep 23 '16 at 6:37




















  • That message should be displayed only if a running VBoxSVC process was detected. Please check again and also take care of appropriate capitals.
    – Takkat
    Sep 21 '16 at 7:43










  • no matter the capitalization, no prozess containing "VB", "vb" or "virutalbox" is running.
    – Klaus Steinhauer
    Sep 22 '16 at 4:13










  • That's weird... the virtualbox code responsible for this message checks for pidof VBoxSVC. There is a single report of erroneous settings in /etc/vbox in virtualbox forums but I can't reproduce this.
    – Takkat
    Sep 22 '16 at 6:22










  • I hadn't found that thread before. But: the directory is empty.
    – Klaus Steinhauer
    Sep 23 '16 at 6:37


















That message should be displayed only if a running VBoxSVC process was detected. Please check again and also take care of appropriate capitals.
– Takkat
Sep 21 '16 at 7:43




That message should be displayed only if a running VBoxSVC process was detected. Please check again and also take care of appropriate capitals.
– Takkat
Sep 21 '16 at 7:43












no matter the capitalization, no prozess containing "VB", "vb" or "virutalbox" is running.
– Klaus Steinhauer
Sep 22 '16 at 4:13




no matter the capitalization, no prozess containing "VB", "vb" or "virutalbox" is running.
– Klaus Steinhauer
Sep 22 '16 at 4:13












That's weird... the virtualbox code responsible for this message checks for pidof VBoxSVC. There is a single report of erroneous settings in /etc/vbox in virtualbox forums but I can't reproduce this.
– Takkat
Sep 22 '16 at 6:22




That's weird... the virtualbox code responsible for this message checks for pidof VBoxSVC. There is a single report of erroneous settings in /etc/vbox in virtualbox forums but I can't reproduce this.
– Takkat
Sep 22 '16 at 6:22












I hadn't found that thread before. But: the directory is empty.
– Klaus Steinhauer
Sep 23 '16 at 6:37






I hadn't found that thread before. But: the directory is empty.
– Klaus Steinhauer
Sep 23 '16 at 6:37












4 Answers
4






active

oldest

votes


















12














I had the same problem, but just a little bit differently. I tried to reinstall virtualbox (switching from distro to official release) and it failed to uninstall, so I could not remove or install the new copy. I managed to fix the issue by creating an empty file:
/usr/lib/virtualbox/prerm-common.sh



Edit: Make the file executable with chmod +x /usr/lib/virtualbox/prerm-common.sh



Then running sudo apt-get remove virtualbox






share|improve this answer



















  • 4




    brilliant! Thank you so much! after creating that file and chmod +x the removal finally worked!
    – Klaus Steinhauer
    Oct 12 '16 at 12:41










  • Glad it worked for you too!
    – TheBat
    Oct 12 '16 at 13:49



















7














I had the same problem. I solved it by killing all the VB processes.





  • get all the processes containing VB



    ps -A | grep VB



  • then kill all processes with the command



    sudo kill <pid>



replace <pid> with the process IDs of the processes you got from above command.





  • then run



    sudo apt-get remove virtualbox-* --purge







share|improve this answer



















  • 1




    That's the perfect answer.
    – maxagaz
    Nov 24 '17 at 4:39



















0














I tried everything suggested here and anywhere else but nothing worked. It kept saying that Running VMs found. What it turned out to be in the end was the fact, that there was autostart.cfg file in /ect/vbox.
After I removed/moved this file the installation went smoothly.
Hard to believe that I spent such a long time trying to resolve this.



The answer was hidden here
https://forums.virtualbox.org/viewtopic.php?f=7&t=74786






share|improve this answer





























    0














    Run the following commands:



    $ whereis vbox


    copy all the folders in the output



    $ sudo rm -rf (all the folders)

    $ whereis virtualbox


    copy all the folders in the output



    $ sudo rm -rf (all folders)

    $ sudo apt-get remove virtualbox-* --purge


    This is how i removed it. Hope it helps.






    share|improve this answer





















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f827733%2fremoving-virtualbox-5-1-in-a-stuck-state%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      12














      I had the same problem, but just a little bit differently. I tried to reinstall virtualbox (switching from distro to official release) and it failed to uninstall, so I could not remove or install the new copy. I managed to fix the issue by creating an empty file:
      /usr/lib/virtualbox/prerm-common.sh



      Edit: Make the file executable with chmod +x /usr/lib/virtualbox/prerm-common.sh



      Then running sudo apt-get remove virtualbox






      share|improve this answer



















      • 4




        brilliant! Thank you so much! after creating that file and chmod +x the removal finally worked!
        – Klaus Steinhauer
        Oct 12 '16 at 12:41










      • Glad it worked for you too!
        – TheBat
        Oct 12 '16 at 13:49
















      12














      I had the same problem, but just a little bit differently. I tried to reinstall virtualbox (switching from distro to official release) and it failed to uninstall, so I could not remove or install the new copy. I managed to fix the issue by creating an empty file:
      /usr/lib/virtualbox/prerm-common.sh



      Edit: Make the file executable with chmod +x /usr/lib/virtualbox/prerm-common.sh



      Then running sudo apt-get remove virtualbox






      share|improve this answer



















      • 4




        brilliant! Thank you so much! after creating that file and chmod +x the removal finally worked!
        – Klaus Steinhauer
        Oct 12 '16 at 12:41










      • Glad it worked for you too!
        – TheBat
        Oct 12 '16 at 13:49














      12












      12








      12






      I had the same problem, but just a little bit differently. I tried to reinstall virtualbox (switching from distro to official release) and it failed to uninstall, so I could not remove or install the new copy. I managed to fix the issue by creating an empty file:
      /usr/lib/virtualbox/prerm-common.sh



      Edit: Make the file executable with chmod +x /usr/lib/virtualbox/prerm-common.sh



      Then running sudo apt-get remove virtualbox






      share|improve this answer














      I had the same problem, but just a little bit differently. I tried to reinstall virtualbox (switching from distro to official release) and it failed to uninstall, so I could not remove or install the new copy. I managed to fix the issue by creating an empty file:
      /usr/lib/virtualbox/prerm-common.sh



      Edit: Make the file executable with chmod +x /usr/lib/virtualbox/prerm-common.sh



      Then running sudo apt-get remove virtualbox







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Mar 21 '17 at 14:42

























      answered Oct 10 '16 at 20:29









      TheBatTheBat

      26625




      26625








      • 4




        brilliant! Thank you so much! after creating that file and chmod +x the removal finally worked!
        – Klaus Steinhauer
        Oct 12 '16 at 12:41










      • Glad it worked for you too!
        – TheBat
        Oct 12 '16 at 13:49














      • 4




        brilliant! Thank you so much! after creating that file and chmod +x the removal finally worked!
        – Klaus Steinhauer
        Oct 12 '16 at 12:41










      • Glad it worked for you too!
        – TheBat
        Oct 12 '16 at 13:49








      4




      4




      brilliant! Thank you so much! after creating that file and chmod +x the removal finally worked!
      – Klaus Steinhauer
      Oct 12 '16 at 12:41




      brilliant! Thank you so much! after creating that file and chmod +x the removal finally worked!
      – Klaus Steinhauer
      Oct 12 '16 at 12:41












      Glad it worked for you too!
      – TheBat
      Oct 12 '16 at 13:49




      Glad it worked for you too!
      – TheBat
      Oct 12 '16 at 13:49













      7














      I had the same problem. I solved it by killing all the VB processes.





      • get all the processes containing VB



        ps -A | grep VB



      • then kill all processes with the command



        sudo kill <pid>



      replace <pid> with the process IDs of the processes you got from above command.





      • then run



        sudo apt-get remove virtualbox-* --purge







      share|improve this answer



















      • 1




        That's the perfect answer.
        – maxagaz
        Nov 24 '17 at 4:39
















      7














      I had the same problem. I solved it by killing all the VB processes.





      • get all the processes containing VB



        ps -A | grep VB



      • then kill all processes with the command



        sudo kill <pid>



      replace <pid> with the process IDs of the processes you got from above command.





      • then run



        sudo apt-get remove virtualbox-* --purge







      share|improve this answer



















      • 1




        That's the perfect answer.
        – maxagaz
        Nov 24 '17 at 4:39














      7












      7








      7






      I had the same problem. I solved it by killing all the VB processes.





      • get all the processes containing VB



        ps -A | grep VB



      • then kill all processes with the command



        sudo kill <pid>



      replace <pid> with the process IDs of the processes you got from above command.





      • then run



        sudo apt-get remove virtualbox-* --purge







      share|improve this answer














      I had the same problem. I solved it by killing all the VB processes.





      • get all the processes containing VB



        ps -A | grep VB



      • then kill all processes with the command



        sudo kill <pid>



      replace <pid> with the process IDs of the processes you got from above command.





      • then run



        sudo apt-get remove virtualbox-* --purge








      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Jun 16 '17 at 20:19









      TheWanderer

      16k113657




      16k113657










      answered Jun 16 '17 at 19:15









      shivam dwivedishivam dwivedi

      7112




      7112








      • 1




        That's the perfect answer.
        – maxagaz
        Nov 24 '17 at 4:39














      • 1




        That's the perfect answer.
        – maxagaz
        Nov 24 '17 at 4:39








      1




      1




      That's the perfect answer.
      – maxagaz
      Nov 24 '17 at 4:39




      That's the perfect answer.
      – maxagaz
      Nov 24 '17 at 4:39











      0














      I tried everything suggested here and anywhere else but nothing worked. It kept saying that Running VMs found. What it turned out to be in the end was the fact, that there was autostart.cfg file in /ect/vbox.
      After I removed/moved this file the installation went smoothly.
      Hard to believe that I spent such a long time trying to resolve this.



      The answer was hidden here
      https://forums.virtualbox.org/viewtopic.php?f=7&t=74786






      share|improve this answer


























        0














        I tried everything suggested here and anywhere else but nothing worked. It kept saying that Running VMs found. What it turned out to be in the end was the fact, that there was autostart.cfg file in /ect/vbox.
        After I removed/moved this file the installation went smoothly.
        Hard to believe that I spent such a long time trying to resolve this.



        The answer was hidden here
        https://forums.virtualbox.org/viewtopic.php?f=7&t=74786






        share|improve this answer
























          0












          0








          0






          I tried everything suggested here and anywhere else but nothing worked. It kept saying that Running VMs found. What it turned out to be in the end was the fact, that there was autostart.cfg file in /ect/vbox.
          After I removed/moved this file the installation went smoothly.
          Hard to believe that I spent such a long time trying to resolve this.



          The answer was hidden here
          https://forums.virtualbox.org/viewtopic.php?f=7&t=74786






          share|improve this answer












          I tried everything suggested here and anywhere else but nothing worked. It kept saying that Running VMs found. What it turned out to be in the end was the fact, that there was autostart.cfg file in /ect/vbox.
          After I removed/moved this file the installation went smoothly.
          Hard to believe that I spent such a long time trying to resolve this.



          The answer was hidden here
          https://forums.virtualbox.org/viewtopic.php?f=7&t=74786







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 23 '17 at 18:31









          VitaVita

          294




          294























              0














              Run the following commands:



              $ whereis vbox


              copy all the folders in the output



              $ sudo rm -rf (all the folders)

              $ whereis virtualbox


              copy all the folders in the output



              $ sudo rm -rf (all folders)

              $ sudo apt-get remove virtualbox-* --purge


              This is how i removed it. Hope it helps.






              share|improve this answer


























                0














                Run the following commands:



                $ whereis vbox


                copy all the folders in the output



                $ sudo rm -rf (all the folders)

                $ whereis virtualbox


                copy all the folders in the output



                $ sudo rm -rf (all folders)

                $ sudo apt-get remove virtualbox-* --purge


                This is how i removed it. Hope it helps.






                share|improve this answer
























                  0












                  0








                  0






                  Run the following commands:



                  $ whereis vbox


                  copy all the folders in the output



                  $ sudo rm -rf (all the folders)

                  $ whereis virtualbox


                  copy all the folders in the output



                  $ sudo rm -rf (all folders)

                  $ sudo apt-get remove virtualbox-* --purge


                  This is how i removed it. Hope it helps.






                  share|improve this answer












                  Run the following commands:



                  $ whereis vbox


                  copy all the folders in the output



                  $ sudo rm -rf (all the folders)

                  $ whereis virtualbox


                  copy all the folders in the output



                  $ sudo rm -rf (all folders)

                  $ sudo apt-get remove virtualbox-* --purge


                  This is how i removed it. Hope it helps.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 18 '18 at 17:02









                  Anuraag RijalAnuraag Rijal

                  1




                  1






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f827733%2fremoving-virtualbox-5-1-in-a-stuck-state%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Quarter-circle Tiles

                      build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

                      Mont Emei