Why does apt-get install python3 with a trailing hyphen remove a lot of packages? [duplicate] The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)apt-get install with '-' (minus / hyphen) removes packages“sudo apt-get install foo-” causes removing foo package and everything depending 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 did all the guest students take carriages to the Yule Ball?
Why don't hard Brexiteers insist on a hard border to prevent illegal immigration after Brexit?
The following signatures were invalid: EXPKEYSIG 1397BC53640DB551
Make it rain characters
"... to apply for a visa" or "... and applied for a visa"?
Difference between "generating set" and free product?
Does Parliament hold absolute power in the UK?
Why can't wing-mounted spoilers be used to steepen approaches?
How can I protect witches in combat who wear limited clothing?
RT6224D-based step down circuit yields 0V - why?
Can smartphones with the same camera sensor have different image quality?
Create an outline of font
Hopping to infinity along a string of digits
Keeping a retro style to sci-fi spaceships?
Would an alien lifeform be able to achieve space travel if lacking in vision?
Scientific Reports - Significant Figures
In horse breeding, what is the female equivalent of putting a horse out "to stud"?
Can a 1st-level character have an ability score above 18?
verb not working in beamer even though I use [fragile]
He got a vote 80% that of Emmanuel Macron’s
The variadic template constructor of my class cannot modify my class members, why is that so?
Can withdrawing asylum be illegal?
Windows 10: How to Lock (not sleep) laptop on lid close?
What are these Gizmos at Izaña Atmospheric Research Center in Spain?
Why does apt-get install python3 with a trailing hyphen remove a lot of packages? [duplicate]
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)apt-get install with '-' (minus / hyphen) removes packages“sudo apt-get install foo-” causes removing foo package and everything depending 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;
This question already has an answer here:
apt-get install with '-' (minus / hyphen) removes packages
2 answers
“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.
command-line apt
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
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();
);
);
);
Apr 8 at 6:11
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.
add a comment |
This question already has an answer here:
apt-get install with '-' (minus / hyphen) removes packages
2 answers
“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.
command-line apt
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
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();
);
);
);
Apr 8 at 6:11
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.
8
Documented features are not bugs.
– guiverc
Apr 7 at 22:24
2
I’m curious -why- this was decided to be the intended behavior. Seems unnecessary, and as the OP found, destructive.
– Scot
Apr 8 at 4:48
@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 typesinstallanyway and you realize at the end... but does this happen often enough to justify this feature? I don't think so.
– Giacomo Alzetta
Apr 8 at 6:11
add a comment |
This question already has an answer here:
apt-get install with '-' (minus / hyphen) removes packages
2 answers
“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.
command-line apt
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
2 answers
“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
2 answers
“sudo apt-get install foo-” causes removing foo package and everything depending on it [duplicate]
2 answers
command-line apt
command-line apt
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.
edited Apr 8 at 5:36
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 Apr 7 at 19:27
Mettigel4_1Mettigel4_1
451
451
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
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();
);
);
);
Apr 8 at 6:11
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
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();
);
);
);
Apr 8 at 6:11
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.
8
Documented features are not bugs.
– guiverc
Apr 7 at 22:24
2
I’m curious -why- this was decided to be the intended behavior. Seems unnecessary, and as the OP found, destructive.
– Scot
Apr 8 at 4:48
@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 typesinstallanyway and you realize at the end... but does this happen often enough to justify this feature? I don't think so.
– Giacomo Alzetta
Apr 8 at 6:11
add a comment |
8
Documented features are not bugs.
– guiverc
Apr 7 at 22:24
2
I’m curious -why- this was decided to be the intended behavior. Seems unnecessary, and as the OP found, destructive.
– Scot
Apr 8 at 4:48
@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 typesinstallanyway and you realize at the end... but does this happen often enough to justify this feature? I don't think so.
– Giacomo Alzetta
Apr 8 at 6:11
8
8
Documented features are not bugs.
– guiverc
Apr 7 at 22:24
Documented features are not bugs.
– guiverc
Apr 7 at 22:24
2
2
I’m curious -why- this was decided to be the intended behavior. Seems unnecessary, and as the OP found, destructive.
– Scot
Apr 8 at 4:48
I’m curious -why- this was decided to be the intended behavior. Seems unnecessary, and as the OP found, destructive.
– Scot
Apr 8 at 4:48
@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
Apr 8 at 6:11
@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
Apr 8 at 6:11
add a comment |
2 Answers
2
active
oldest
votes
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:
Firstly, you can install the ubuntu-desktop metapackage to get the default desktop environment back:
sudo apt-get install ubuntu-desktop
Now, 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
6
It might be worth mentioning thatsudo apt-get install ubuntu-desktopwill 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
Apr 7 at 22:21
@HenningMakholm Makes sense; edited.
– heemayl
Apr 8 at 6:27
add a comment |
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.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
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:
Firstly, you can install the ubuntu-desktop metapackage to get the default desktop environment back:
sudo apt-get install ubuntu-desktop
Now, 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
6
It might be worth mentioning thatsudo apt-get install ubuntu-desktopwill 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
Apr 7 at 22:21
@HenningMakholm Makes sense; edited.
– heemayl
Apr 8 at 6:27
add a comment |
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:
Firstly, you can install the ubuntu-desktop metapackage to get the default desktop environment back:
sudo apt-get install ubuntu-desktop
Now, 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
6
It might be worth mentioning thatsudo apt-get install ubuntu-desktopwill 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
Apr 7 at 22:21
@HenningMakholm Makes sense; edited.
– heemayl
Apr 8 at 6:27
add a comment |
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:
Firstly, you can install the ubuntu-desktop metapackage to get the default desktop environment back:
sudo apt-get install ubuntu-desktop
Now, 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
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:
Firstly, you can install the ubuntu-desktop metapackage to get the default desktop environment back:
sudo apt-get install ubuntu-desktop
Now, 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
edited Apr 8 at 6:27
answered Apr 7 at 19:36
heemaylheemayl
68.2k11144215
68.2k11144215
6
It might be worth mentioning thatsudo apt-get install ubuntu-desktopwill 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
Apr 7 at 22:21
@HenningMakholm Makes sense; edited.
– heemayl
Apr 8 at 6:27
add a comment |
6
It might be worth mentioning thatsudo apt-get install ubuntu-desktopwill 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
Apr 7 at 22:21
@HenningMakholm Makes sense; edited.
– heemayl
Apr 8 at 6:27
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
Apr 7 at 22:21
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
Apr 7 at 22:21
@HenningMakholm Makes sense; edited.
– heemayl
Apr 8 at 6:27
@HenningMakholm Makes sense; edited.
– heemayl
Apr 8 at 6:27
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
edited Apr 7 at 19:38
N0rbert
25.4k853121
25.4k853121
answered Apr 7 at 19:36
vidarlovidarlo
10.7k52852
10.7k52852
add a comment |
add a comment |
8
Documented features are not bugs.
– guiverc
Apr 7 at 22:24
2
I’m curious -why- this was decided to be the intended behavior. Seems unnecessary, and as the OP found, destructive.
– Scot
Apr 8 at 4:48
@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
installanyway and you realize at the end... but does this happen often enough to justify this feature? I don't think so.– Giacomo Alzetta
Apr 8 at 6:11