apt: how to delete all packages needed by X but skip packages needed by Y? [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-1
down vote

favorite












I installed Ubuntu bionic. I then installed Unity desktop. How can I delete all packages that are required by Gnome, but skip packages that are also needed by Unity.



As an example, Wayland/xorg will be skip. But gnome shell will be deleted.










share|improve this question















closed as too broad by Rui F Ribeiro, RalfFriedl, Thomas, Goro, jimmij Sep 28 at 19:49


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • By default, apt does not remove dependencies of installed packages. By default, if unity is installed, then all of unity's dependencies are installed.
    – RobertL
    Sep 27 at 17:25














up vote
-1
down vote

favorite












I installed Ubuntu bionic. I then installed Unity desktop. How can I delete all packages that are required by Gnome, but skip packages that are also needed by Unity.



As an example, Wayland/xorg will be skip. But gnome shell will be deleted.










share|improve this question















closed as too broad by Rui F Ribeiro, RalfFriedl, Thomas, Goro, jimmij Sep 28 at 19:49


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • By default, apt does not remove dependencies of installed packages. By default, if unity is installed, then all of unity's dependencies are installed.
    – RobertL
    Sep 27 at 17:25












up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I installed Ubuntu bionic. I then installed Unity desktop. How can I delete all packages that are required by Gnome, but skip packages that are also needed by Unity.



As an example, Wayland/xorg will be skip. But gnome shell will be deleted.










share|improve this question















I installed Ubuntu bionic. I then installed Unity desktop. How can I delete all packages that are required by Gnome, but skip packages that are also needed by Unity.



As an example, Wayland/xorg will be skip. But gnome shell will be deleted.







apt






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 27 at 15:57









Goro

6,67752865




6,67752865










asked Sep 27 at 15:21









mrjayviper

476615




476615




closed as too broad by Rui F Ribeiro, RalfFriedl, Thomas, Goro, jimmij Sep 28 at 19:49


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as too broad by Rui F Ribeiro, RalfFriedl, Thomas, Goro, jimmij Sep 28 at 19:49


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.













  • By default, apt does not remove dependencies of installed packages. By default, if unity is installed, then all of unity's dependencies are installed.
    – RobertL
    Sep 27 at 17:25
















  • By default, apt does not remove dependencies of installed packages. By default, if unity is installed, then all of unity's dependencies are installed.
    – RobertL
    Sep 27 at 17:25















By default, apt does not remove dependencies of installed packages. By default, if unity is installed, then all of unity's dependencies are installed.
– RobertL
Sep 27 at 17:25




By default, apt does not remove dependencies of installed packages. By default, if unity is installed, then all of unity's dependencies are installed.
– RobertL
Sep 27 at 17:25










1 Answer
1






active

oldest

votes

















up vote
0
down vote













It's easy! For packages P and Q (X is the actual name of a package)




  1. Remove package P.



    sudo apt remove P




  2. Remove all automatically installed packages not required by any other package (including Q).



    sudo apt autoremove







share|improve this answer



























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    It's easy! For packages P and Q (X is the actual name of a package)




    1. Remove package P.



      sudo apt remove P




    2. Remove all automatically installed packages not required by any other package (including Q).



      sudo apt autoremove







    share|improve this answer
























      up vote
      0
      down vote













      It's easy! For packages P and Q (X is the actual name of a package)




      1. Remove package P.



        sudo apt remove P




      2. Remove all automatically installed packages not required by any other package (including Q).



        sudo apt autoremove







      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        It's easy! For packages P and Q (X is the actual name of a package)




        1. Remove package P.



          sudo apt remove P




        2. Remove all automatically installed packages not required by any other package (including Q).



          sudo apt autoremove







        share|improve this answer












        It's easy! For packages P and Q (X is the actual name of a package)




        1. Remove package P.



          sudo apt remove P




        2. Remove all automatically installed packages not required by any other package (including Q).



          sudo apt autoremove








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Sep 27 at 16:28









        waltinator

        71048




        71048












            Popular posts from this blog

            Peggy Mitchell

            Palaiologos

            The Forum (Inglewood, California)