Why does apt-get install python3 with a trailing hyphen remove a lot of packages? [duplicate]apt-get install with '-' removes?“sudo apt -get install foo-” causes removing foo package and everything depends on itWhy does `apt-get install python-` remove everything?Default path changed after uninstalling python and reinstalling ubuntu-desktopPackages are removed when I use “apt-get install” with a hyphen after the package nameMust execute “sudo su” and then do apt-get update/upgrade/install, prefacing with sudo doesn't workRedirected OutputThe colors when doing “ls” at my ubuntu server diappeared just like thatapt-get remove indicator-bluetooth removes lot of packagesWhy does “sudo apt-get install gpsd” return with errors?How to restore after accidentally apt-get remove python'sudo apt autoremove python3' removed a lot of packages

Why Is Death Allowed In the Matrix?

Non-Jewish family in an Orthodox Jewish Wedding

Draw simple lines in Inkscape

The use of multiple foreign keys on same column in SQL Server

Why has Russell's definition of numbers using equivalence classes been finally abandoned? ( If it has actually been abandoned).

Why are 150k or 200k jobs considered good when there are 300k+ births a month?

least quadratic residue under GRH: an EXPLICIT bound

I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine

What Brexit solution does the DUP want?

How can bays and straits be determined in a procedurally generated map?

Why is "Reports" in sentence down without "The"

Can I make popcorn with any corn?

Simulate Bitwise Cyclic Tag

I see my dog run

What is the meaning of "of trouble" in the following sentence?

Can you lasso down a wizard who is using the Levitate spell?

Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?

How do we improve the relationship with a client software team that performs poorly and is becoming less collaborative?

Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)

How is it possible for user's password to be changed after storage was encrypted? (on OS X, Android)

Is there really no realistic way for a skeleton monster to move around without magic?

How to use Pandas to get the count of every combination inclusive

Is there a familial term for apples and pears?

How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?



Why does apt-get install python3 with a trailing hyphen remove a lot of packages? [duplicate]


apt-get install with '-' removes?“sudo apt -get install foo-” causes removing foo package and everything depends on itWhy does `apt-get install python-` remove everything?Default path changed after uninstalling python and reinstalling ubuntu-desktopPackages are removed when I use “apt-get install” with a hyphen after the package nameMust execute “sudo su” and then do apt-get update/upgrade/install, prefacing with sudo doesn't workRedirected OutputThe colors when doing “ls” at my ubuntu server diappeared just like thatapt-get remove indicator-bluetooth removes lot of packagesWhy does “sudo apt-get install gpsd” return with errors?How to restore after accidentally apt-get remove python'sudo apt autoremove python3' removed a lot of packages






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








8
















This question already has an answer here:



  • apt-get install with '-' (minus / hyphen) removes packages

    1 answer



  • “sudo apt-get install foo-” causes removing foo package and everything depending on it [duplicate]

    2 answers



While is was installing something with the sudo apt-get install command I accidentally accepted the command



sudo apt-get install python3-


(yeah I know it is stupid to just accept this but I did a lot of those and i just continued to click y).



By executing the command I deleted my whole visual desktop of Ubuntu (I just had the plain shell but I recovered the visual desktop by now). I don't know if I am just stupid but nevertheless I want to create awareness that you shouldn't use the command.



If you can explain to me why happened what happened feel free to explain it to me.










share|improve this question









New contributor




Mettigel4_1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











marked as duplicate by pomsky, karel, Zanna command-line
Users with the  command-line badge can single-handedly close command-line questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
4 mins ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • 7





    Documented features are not bugs.

    – guiverc
    7 hours ago






  • 2





    I’m curious -why- this was decided to be the intended behavior. Seems unnecessary, and as the OP found, destructive.

    – Scot
    1 hour ago






  • 1





    Possible duplicate of "sudo apt -get install foo-" causes removing foo package and everything depends on it && askubuntu.com/questions/880291/apt-get-install-with-removes

    – pomsky
    39 mins ago












  • @Scot I agree with you. Since there is already a dedicated command to remove packages I don't see the need for this feature. Seems like somebody wanted to include a "pro feature" that hurts new users and provides basically 0 value... The only case in which it would be useful is when you want to remove a package but your hand types install anyway and you realize at the end... but does this happen often enough to justify this feature? I don't think so.

    – Giacomo Alzetta
    4 mins ago

















8
















This question already has an answer here:



  • apt-get install with '-' (minus / hyphen) removes packages

    1 answer



  • “sudo apt-get install foo-” causes removing foo package and everything depending on it [duplicate]

    2 answers



While is was installing something with the sudo apt-get install command I accidentally accepted the command



sudo apt-get install python3-


(yeah I know it is stupid to just accept this but I did a lot of those and i just continued to click y).



By executing the command I deleted my whole visual desktop of Ubuntu (I just had the plain shell but I recovered the visual desktop by now). I don't know if I am just stupid but nevertheless I want to create awareness that you shouldn't use the command.



If you can explain to me why happened what happened feel free to explain it to me.










share|improve this question









New contributor




Mettigel4_1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











marked as duplicate by pomsky, karel, Zanna command-line
Users with the  command-line badge can single-handedly close command-line questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
4 mins ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • 7





    Documented features are not bugs.

    – guiverc
    7 hours ago






  • 2





    I’m curious -why- this was decided to be the intended behavior. Seems unnecessary, and as the OP found, destructive.

    – Scot
    1 hour ago






  • 1





    Possible duplicate of "sudo apt -get install foo-" causes removing foo package and everything depends on it && askubuntu.com/questions/880291/apt-get-install-with-removes

    – pomsky
    39 mins ago












  • @Scot I agree with you. Since there is already a dedicated command to remove packages I don't see the need for this feature. Seems like somebody wanted to include a "pro feature" that hurts new users and provides basically 0 value... The only case in which it would be useful is when you want to remove a package but your hand types install anyway and you realize at the end... but does this happen often enough to justify this feature? I don't think so.

    – Giacomo Alzetta
    4 mins ago













8












8








8









This question already has an answer here:



  • apt-get install with '-' (minus / hyphen) removes packages

    1 answer



  • “sudo apt-get install foo-” causes removing foo package and everything depending on it [duplicate]

    2 answers



While is was installing something with the sudo apt-get install command I accidentally accepted the command



sudo apt-get install python3-


(yeah I know it is stupid to just accept this but I did a lot of those and i just continued to click y).



By executing the command I deleted my whole visual desktop of Ubuntu (I just had the plain shell but I recovered the visual desktop by now). I don't know if I am just stupid but nevertheless I want to create awareness that you shouldn't use the command.



If you can explain to me why happened what happened feel free to explain it to me.










share|improve this question









New contributor




Mettigel4_1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













This question already has an answer here:



  • apt-get install with '-' (minus / hyphen) removes packages

    1 answer



  • “sudo apt-get install foo-” causes removing foo package and everything depending on it [duplicate]

    2 answers



While is was installing something with the sudo apt-get install command I accidentally accepted the command



sudo apt-get install python3-


(yeah I know it is stupid to just accept this but I did a lot of those and i just continued to click y).



By executing the command I deleted my whole visual desktop of Ubuntu (I just had the plain shell but I recovered the visual desktop by now). I don't know if I am just stupid but nevertheless I want to create awareness that you shouldn't use the command.



If you can explain to me why happened what happened feel free to explain it to me.





This question already has an answer here:



  • apt-get install with '-' (minus / hyphen) removes packages

    1 answer



  • “sudo apt-get install foo-” causes removing foo package and everything depending on it [duplicate]

    2 answers







command-line apt






share|improve this question









New contributor




Mettigel4_1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Mettigel4_1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 39 mins ago









Community

1




1






New contributor




Mettigel4_1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 10 hours ago









Mettigel4_1Mettigel4_1

471




471




New contributor




Mettigel4_1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Mettigel4_1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Mettigel4_1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




marked as duplicate by pomsky, karel, Zanna command-line
Users with the  command-line badge can single-handedly close command-line questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
4 mins ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by pomsky, karel, Zanna command-line
Users with the  command-line badge can single-handedly close command-line questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
4 mins ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









  • 7





    Documented features are not bugs.

    – guiverc
    7 hours ago






  • 2





    I’m curious -why- this was decided to be the intended behavior. Seems unnecessary, and as the OP found, destructive.

    – Scot
    1 hour ago






  • 1





    Possible duplicate of "sudo apt -get install foo-" causes removing foo package and everything depends on it && askubuntu.com/questions/880291/apt-get-install-with-removes

    – pomsky
    39 mins ago












  • @Scot I agree with you. Since there is already a dedicated command to remove packages I don't see the need for this feature. Seems like somebody wanted to include a "pro feature" that hurts new users and provides basically 0 value... The only case in which it would be useful is when you want to remove a package but your hand types install anyway and you realize at the end... but does this happen often enough to justify this feature? I don't think so.

    – Giacomo Alzetta
    4 mins ago












  • 7





    Documented features are not bugs.

    – guiverc
    7 hours ago






  • 2





    I’m curious -why- this was decided to be the intended behavior. Seems unnecessary, and as the OP found, destructive.

    – Scot
    1 hour ago






  • 1





    Possible duplicate of "sudo apt -get install foo-" causes removing foo package and everything depends on it && askubuntu.com/questions/880291/apt-get-install-with-removes

    – pomsky
    39 mins ago












  • @Scot I agree with you. Since there is already a dedicated command to remove packages I don't see the need for this feature. Seems like somebody wanted to include a "pro feature" that hurts new users and provides basically 0 value... The only case in which it would be useful is when you want to remove a package but your hand types install anyway and you realize at the end... but does this happen often enough to justify this feature? I don't think so.

    – Giacomo Alzetta
    4 mins ago







7




7





Documented features are not bugs.

– guiverc
7 hours ago





Documented features are not bugs.

– guiverc
7 hours ago




2




2





I’m curious -why- this was decided to be the intended behavior. Seems unnecessary, and as the OP found, destructive.

– Scot
1 hour ago





I’m curious -why- this was decided to be the intended behavior. Seems unnecessary, and as the OP found, destructive.

– Scot
1 hour ago




1




1





Possible duplicate of "sudo apt -get install foo-" causes removing foo package and everything depends on it && askubuntu.com/questions/880291/apt-get-install-with-removes

– pomsky
39 mins ago






Possible duplicate of "sudo apt -get install foo-" causes removing foo package and everything depends on it && askubuntu.com/questions/880291/apt-get-install-with-removes

– pomsky
39 mins ago














@Scot I agree with you. Since there is already a dedicated command to remove packages I don't see the need for this feature. Seems like somebody wanted to include a "pro feature" that hurts new users and provides basically 0 value... The only case in which it would be useful is when you want to remove a package but your hand types install anyway and you realize at the end... but does this happen often enough to justify this feature? I don't think so.

– Giacomo Alzetta
4 mins ago





@Scot I agree with you. Since there is already a dedicated command to remove packages I don't see the need for this feature. Seems like somebody wanted to include a "pro feature" that hurts new users and provides basically 0 value... The only case in which it would be useful is when you want to remove a package but your hand types install anyway and you realize at the end... but does this happen often enough to justify this feature? I don't think so.

– Giacomo Alzetta
4 mins ago










2 Answers
2






active

oldest

votes


















21














This is not a bug; this is documented in the man page. From man apt-get's install section1 (emphasis mine):




If a hyphen is appended to the package name (with no intervening space), the identified package will be removed if it is installed. Similarly a plus sign can be used to designate a package to install.




So, when you did:



sudo apt-get install python3-


you've removed the python3 package and all the dependent packages (which includes the packages you mentioned).




Fix:



To re-install the removed packages, go to /var/log/apt/history.log, pick the packages, and run sudo apt-get install on them.



You might also want to peek into /var/log/dpkg.log.




1 If you have less as the man pager, you can go to the install section of man apt-get directly:



LESS='+/^[[:blank:]]+install' man apt-get





share|improve this answer




















  • 6





    It might be worth mentioning that sudo apt-get install ubuntu-desktop will get most of the desktop environment back with a single command, without needing to hunt down individual package names. (Of course that doesn't cover whatever one has installed manually on top of the defaults, but further recovery can proceed in an environment that may be more familiar than the Linux console).

    – Henning Makholm
    7 hours ago



















10














No, you didn't find a bug. From man apt-get:




If a hyphen is appended to the package name (with no intervening space), the identified package will be removed if it is installed. Similarly a plus sign can be used to designate a package to install. These latter features may be used to override decisions made by apt-get's conflict resolution system.




It's intentional. I'm not sure it's good design, but it is worth reading what changes apt proposes before proceeding.



Combined with globbing it may produce some rather... spectacular results at times.






share|improve this answer































    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    21














    This is not a bug; this is documented in the man page. From man apt-get's install section1 (emphasis mine):




    If a hyphen is appended to the package name (with no intervening space), the identified package will be removed if it is installed. Similarly a plus sign can be used to designate a package to install.




    So, when you did:



    sudo apt-get install python3-


    you've removed the python3 package and all the dependent packages (which includes the packages you mentioned).




    Fix:



    To re-install the removed packages, go to /var/log/apt/history.log, pick the packages, and run sudo apt-get install on them.



    You might also want to peek into /var/log/dpkg.log.




    1 If you have less as the man pager, you can go to the install section of man apt-get directly:



    LESS='+/^[[:blank:]]+install' man apt-get





    share|improve this answer




















    • 6





      It might be worth mentioning that sudo apt-get install ubuntu-desktop will get most of the desktop environment back with a single command, without needing to hunt down individual package names. (Of course that doesn't cover whatever one has installed manually on top of the defaults, but further recovery can proceed in an environment that may be more familiar than the Linux console).

      – Henning Makholm
      7 hours ago
















    21














    This is not a bug; this is documented in the man page. From man apt-get's install section1 (emphasis mine):




    If a hyphen is appended to the package name (with no intervening space), the identified package will be removed if it is installed. Similarly a plus sign can be used to designate a package to install.




    So, when you did:



    sudo apt-get install python3-


    you've removed the python3 package and all the dependent packages (which includes the packages you mentioned).




    Fix:



    To re-install the removed packages, go to /var/log/apt/history.log, pick the packages, and run sudo apt-get install on them.



    You might also want to peek into /var/log/dpkg.log.




    1 If you have less as the man pager, you can go to the install section of man apt-get directly:



    LESS='+/^[[:blank:]]+install' man apt-get





    share|improve this answer




















    • 6





      It might be worth mentioning that sudo apt-get install ubuntu-desktop will get most of the desktop environment back with a single command, without needing to hunt down individual package names. (Of course that doesn't cover whatever one has installed manually on top of the defaults, but further recovery can proceed in an environment that may be more familiar than the Linux console).

      – Henning Makholm
      7 hours ago














    21












    21








    21







    This is not a bug; this is documented in the man page. From man apt-get's install section1 (emphasis mine):




    If a hyphen is appended to the package name (with no intervening space), the identified package will be removed if it is installed. Similarly a plus sign can be used to designate a package to install.




    So, when you did:



    sudo apt-get install python3-


    you've removed the python3 package and all the dependent packages (which includes the packages you mentioned).




    Fix:



    To re-install the removed packages, go to /var/log/apt/history.log, pick the packages, and run sudo apt-get install on them.



    You might also want to peek into /var/log/dpkg.log.




    1 If you have less as the man pager, you can go to the install section of man apt-get directly:



    LESS='+/^[[:blank:]]+install' man apt-get





    share|improve this answer















    This is not a bug; this is documented in the man page. From man apt-get's install section1 (emphasis mine):




    If a hyphen is appended to the package name (with no intervening space), the identified package will be removed if it is installed. Similarly a plus sign can be used to designate a package to install.




    So, when you did:



    sudo apt-get install python3-


    you've removed the python3 package and all the dependent packages (which includes the packages you mentioned).




    Fix:



    To re-install the removed packages, go to /var/log/apt/history.log, pick the packages, and run sudo apt-get install on them.



    You might also want to peek into /var/log/dpkg.log.




    1 If you have less as the man pager, you can go to the install section of man apt-get directly:



    LESS='+/^[[:blank:]]+install' man apt-get






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 10 hours ago

























    answered 10 hours ago









    heemaylheemayl

    68.1k11142215




    68.1k11142215







    • 6





      It might be worth mentioning that sudo apt-get install ubuntu-desktop will get most of the desktop environment back with a single command, without needing to hunt down individual package names. (Of course that doesn't cover whatever one has installed manually on top of the defaults, but further recovery can proceed in an environment that may be more familiar than the Linux console).

      – Henning Makholm
      7 hours ago













    • 6





      It might be worth mentioning that sudo apt-get install ubuntu-desktop will get most of the desktop environment back with a single command, without needing to hunt down individual package names. (Of course that doesn't cover whatever one has installed manually on top of the defaults, but further recovery can proceed in an environment that may be more familiar than the Linux console).

      – Henning Makholm
      7 hours ago








    6




    6





    It might be worth mentioning that sudo apt-get install ubuntu-desktop will get most of the desktop environment back with a single command, without needing to hunt down individual package names. (Of course that doesn't cover whatever one has installed manually on top of the defaults, but further recovery can proceed in an environment that may be more familiar than the Linux console).

    – Henning Makholm
    7 hours ago






    It might be worth mentioning that sudo apt-get install ubuntu-desktop will get most of the desktop environment back with a single command, without needing to hunt down individual package names. (Of course that doesn't cover whatever one has installed manually on top of the defaults, but further recovery can proceed in an environment that may be more familiar than the Linux console).

    – Henning Makholm
    7 hours ago














    10














    No, you didn't find a bug. From man apt-get:




    If a hyphen is appended to the package name (with no intervening space), the identified package will be removed if it is installed. Similarly a plus sign can be used to designate a package to install. These latter features may be used to override decisions made by apt-get's conflict resolution system.




    It's intentional. I'm not sure it's good design, but it is worth reading what changes apt proposes before proceeding.



    Combined with globbing it may produce some rather... spectacular results at times.






    share|improve this answer





























      10














      No, you didn't find a bug. From man apt-get:




      If a hyphen is appended to the package name (with no intervening space), the identified package will be removed if it is installed. Similarly a plus sign can be used to designate a package to install. These latter features may be used to override decisions made by apt-get's conflict resolution system.




      It's intentional. I'm not sure it's good design, but it is worth reading what changes apt proposes before proceeding.



      Combined with globbing it may produce some rather... spectacular results at times.






      share|improve this answer



























        10












        10








        10







        No, you didn't find a bug. From man apt-get:




        If a hyphen is appended to the package name (with no intervening space), the identified package will be removed if it is installed. Similarly a plus sign can be used to designate a package to install. These latter features may be used to override decisions made by apt-get's conflict resolution system.




        It's intentional. I'm not sure it's good design, but it is worth reading what changes apt proposes before proceeding.



        Combined with globbing it may produce some rather... spectacular results at times.






        share|improve this answer















        No, you didn't find a bug. From man apt-get:




        If a hyphen is appended to the package name (with no intervening space), the identified package will be removed if it is installed. Similarly a plus sign can be used to designate a package to install. These latter features may be used to override decisions made by apt-get's conflict resolution system.




        It's intentional. I'm not sure it's good design, but it is worth reading what changes apt proposes before proceeding.



        Combined with globbing it may produce some rather... spectacular results at times.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 10 hours ago









        N0rbert

        25.1k853118




        25.1k853118










        answered 10 hours ago









        vidarlovidarlo

        10.7k52852




        10.7k52852













            Popular posts from this blog

            Isabella Eugénie Boyer Biographie | Références | Menu de navigationmodifiermodifier le codeComparator to Compute the Relative Value of a U.S. Dollar Amount – 1774 to Present.

            Lioubotyn Sommaire Géographie | Histoire | Population | Notes et références | Liens externes | Menu de navigationlubotin.kharkov.uamodifier« Recensements et estimations de la population depuis 1897 »« Office des statistiques d'Ukraine : population au 1er janvier 2010, 2011 et 2012 »« Office des statistiques d'Ukraine : population au 1er janvier 2011, 2012 et 2013 »Informations officiellesCartes topographiquesCarte routièrem

            Mpande kaSenzangakhona Biographie | Références | Menu de navigationmodifierMpande kaSenzangakhonavoir la liste des auteursm