Can 'sudo apt-get remove [write]' destroy my Ubuntu?apt-get remove with wildcard removed way more than expected. why?apt-get fail with “Unpacking replacement diff”Recovering an Ubuntu installation - Ubuntu eats itself after 'sudo apt-get install -f'How to modify program search path?Upgrading VIM 7.3 to latest release via apt-getBash script to log all recent apt-get installs and locationsDifference between 'sudo apt-get' and 'sudo -E apt-get'apt-get install stackI keep getting dependency and “lsb not configured” errors when I try to install any software with apt-get installHow to find out how a program was removed?Why does apt-get autoremove uninstall less packages than aptitude remove does?

Why did Captain America age?

My perfect evil overlord plan... or is it?

Are there variations of the regular runtimes of the Big-O-Notation?

What is the name of meteoroids which hit Moon, Mars, or pretty much anything that isn’t the Earth?

What was the plan for an abort of the Enola Gay's mission to drop the atomic bomb?

Is it nonsense to say B > [A > B]?

Succinct and gender-neutral Russian word for "writer"

Electric kick drum pedal starts oscillating in such a way that it does not register hits

Can a surprised creature fall prone voluntarily on their turn?

A Cunning Riley Riddle

Is a vertical stabiliser needed for straight line flight in a glider?

Which other programming languages apart from Python and predecessor are out there using indentation to define code blocks?

Whats the purpose of lockedLoadData / uncached page build takes around a minute, spent in usleep

Is every story set in the future "science fiction"?

Is ‘despite that’ right?

How to compare d20+x with advantage to d20+y without advantage (x < y)

Translation of the latin word 'sit' in Thomas Aquinas' works

Different problems with tabularx

Improving Sati-Sampajañña (situative wisdom)

How to handle DM constantly stealing everything from sleeping characters?

Why does increasing the sampling rate make implementing an anti-aliasing filter easier?

spatiotemporal regression

Renting a house to a graduate student in my department

Examples where existence is harder than evaluation



Can 'sudo apt-get remove [write]' destroy my Ubuntu?


apt-get remove with wildcard removed way more than expected. why?apt-get fail with “Unpacking replacement diff”Recovering an Ubuntu installation - Ubuntu eats itself after 'sudo apt-get install -f'How to modify program search path?Upgrading VIM 7.3 to latest release via apt-getBash script to log all recent apt-get installs and locationsDifference between 'sudo apt-get' and 'sudo -E apt-get'apt-get install stackI keep getting dependency and “lsb not configured” errors when I try to install any software with apt-get installHow to find out how a program was removed?Why does apt-get autoremove uninstall less packages than aptitude remove does?






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








24















I am pretty new in this ubuntu domain so please be gentle :o)
I wanted to remove my 'write' app, so I found this on a site:
To remove a package type:



sudo apt-get remove [package_name]


So I typed:



sudo apt-get remove [write]


And afterwards I agreed on the prompt: 'yes, do what I say!' or something like that. And voila! My Ubuntu was deleting!
Can anybody tell me why?










share|improve this question









New contributor



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














  • 7





    You literally entered ... [write], including the brackets? Then I'm afraid you indeed removed plenty of packages.

    – PerlDuck
    5 hours ago











  • Yes including the brackets :o|

    – Jesper Joachim Sørensen
    5 hours ago






  • 7





    A teachable moment about reading the complete output. Many of us have done something similar...once.

    – user535733
    3 hours ago












  • $20 says you'll only make that mistake once, :p

    – Gerowen
    2 hours ago






  • 1





    So apt-get said "This should NOT be done unless you know exactly what you are doing! You are about to do something potentially harmful.", and you let it continue without knowing what it was going to do anyway?

    – Joseph Sible
    1 hour ago

















24















I am pretty new in this ubuntu domain so please be gentle :o)
I wanted to remove my 'write' app, so I found this on a site:
To remove a package type:



sudo apt-get remove [package_name]


So I typed:



sudo apt-get remove [write]


And afterwards I agreed on the prompt: 'yes, do what I say!' or something like that. And voila! My Ubuntu was deleting!
Can anybody tell me why?










share|improve this question









New contributor



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














  • 7





    You literally entered ... [write], including the brackets? Then I'm afraid you indeed removed plenty of packages.

    – PerlDuck
    5 hours ago











  • Yes including the brackets :o|

    – Jesper Joachim Sørensen
    5 hours ago






  • 7





    A teachable moment about reading the complete output. Many of us have done something similar...once.

    – user535733
    3 hours ago












  • $20 says you'll only make that mistake once, :p

    – Gerowen
    2 hours ago






  • 1





    So apt-get said "This should NOT be done unless you know exactly what you are doing! You are about to do something potentially harmful.", and you let it continue without knowing what it was going to do anyway?

    – Joseph Sible
    1 hour ago













24












24








24


2






I am pretty new in this ubuntu domain so please be gentle :o)
I wanted to remove my 'write' app, so I found this on a site:
To remove a package type:



sudo apt-get remove [package_name]


So I typed:



sudo apt-get remove [write]


And afterwards I agreed on the prompt: 'yes, do what I say!' or something like that. And voila! My Ubuntu was deleting!
Can anybody tell me why?










share|improve this question









New contributor



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











I am pretty new in this ubuntu domain so please be gentle :o)
I wanted to remove my 'write' app, so I found this on a site:
To remove a package type:



sudo apt-get remove [package_name]


So I typed:



sudo apt-get remove [write]


And afterwards I agreed on the prompt: 'yes, do what I say!' or something like that. And voila! My Ubuntu was deleting!
Can anybody tell me why?







command-line apt bash sudo






share|improve this question









New contributor



Jesper Joachim Sørensen 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



Jesper Joachim Sørensen 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 2 hours ago









dessert

26.2k676111




26.2k676111






New contributor



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








asked 5 hours ago









Jesper Joachim SørensenJesper Joachim Sørensen

1233




1233




New contributor



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




New contributor




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









  • 7





    You literally entered ... [write], including the brackets? Then I'm afraid you indeed removed plenty of packages.

    – PerlDuck
    5 hours ago











  • Yes including the brackets :o|

    – Jesper Joachim Sørensen
    5 hours ago






  • 7





    A teachable moment about reading the complete output. Many of us have done something similar...once.

    – user535733
    3 hours ago












  • $20 says you'll only make that mistake once, :p

    – Gerowen
    2 hours ago






  • 1





    So apt-get said "This should NOT be done unless you know exactly what you are doing! You are about to do something potentially harmful.", and you let it continue without knowing what it was going to do anyway?

    – Joseph Sible
    1 hour ago












  • 7





    You literally entered ... [write], including the brackets? Then I'm afraid you indeed removed plenty of packages.

    – PerlDuck
    5 hours ago











  • Yes including the brackets :o|

    – Jesper Joachim Sørensen
    5 hours ago






  • 7





    A teachable moment about reading the complete output. Many of us have done something similar...once.

    – user535733
    3 hours ago












  • $20 says you'll only make that mistake once, :p

    – Gerowen
    2 hours ago






  • 1





    So apt-get said "This should NOT be done unless you know exactly what you are doing! You are about to do something potentially harmful.", and you let it continue without knowing what it was going to do anyway?

    – Joseph Sible
    1 hour ago







7




7





You literally entered ... [write], including the brackets? Then I'm afraid you indeed removed plenty of packages.

– PerlDuck
5 hours ago





You literally entered ... [write], including the brackets? Then I'm afraid you indeed removed plenty of packages.

– PerlDuck
5 hours ago













Yes including the brackets :o|

– Jesper Joachim Sørensen
5 hours ago





Yes including the brackets :o|

– Jesper Joachim Sørensen
5 hours ago




7




7





A teachable moment about reading the complete output. Many of us have done something similar...once.

– user535733
3 hours ago






A teachable moment about reading the complete output. Many of us have done something similar...once.

– user535733
3 hours ago














$20 says you'll only make that mistake once, :p

– Gerowen
2 hours ago





$20 says you'll only make that mistake once, :p

– Gerowen
2 hours ago




1




1





So apt-get said "This should NOT be done unless you know exactly what you are doing! You are about to do something potentially harmful.", and you let it continue without knowing what it was going to do anyway?

– Joseph Sible
1 hour ago





So apt-get said "This should NOT be done unless you know exactly what you are doing! You are about to do something potentially harmful.", and you let it continue without knowing what it was going to do anyway?

– Joseph Sible
1 hour ago










1 Answer
1






active

oldest

votes


















28














The correct command to remove a package named write is:



sudo apt-get remove write


[write] is a character set matching the characters “w”, “r”, “i”, “t” and “e” and as matching is done by substring by apt. The command you ran thus matched all packages with one of these characters in it, which of course are a lot. To quote apt’s output listing just the essential ones:



WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
apt adduser (due to apt) gpgv (due to apt) ubuntu-keyring (due to apt) libapt-pkg5.0 (due to apt) libc6 (due to apt) libgcc1 (due to apt) libgnutls30 (due to apt) libseccomp2 (due to apt)
libstdc++6 (due to apt) base-files base-passwd libdebconfclient0 (due to base-passwd) bash libtinfo5 (due to bash) debianutils (due to bash) bsdutils libsystemd0 (due to bsdutils) coreutils
libacl1 (due to coreutils) libattr1 (due to coreutils) libselinux1 (due to coreutils) dash dpkg (due to dash) diffutils libbz2-1.0 (due to dpkg) liblzma5 (due to dpkg) libzstd1 (due to dpkg)
zlib1g (due to dpkg) tar (due to dpkg) e2fsprogs libblkid1 (due to e2fsprogs) libcom-err2 (due to e2fsprogs) libext2fs2 (due to e2fsprogs) libss2 (due to e2fsprogs) libuuid1 (due to e2fsprogs) fdisk
libfdisk1 (due to fdisk) libmount1 (due to fdisk) libncursesw5 (due to fdisk) libsmartcols1 (due to fdisk) findutils grep libpcre3 (due to grep) install-info (due to grep) gzip hostname init
systemd-sysv (due to init) init-system-helpers (due to init) perl-base (due to init-system-helpers) libc-bin login libaudit1 (due to login) libpam0g (due to login) libpam-runtime (due to login)
libpam-modules (due to login) mount util-linux (due to mount) ncurses-base ncurses-bin sed sysvinit-utils libudev1 (due to util-linux)
0 upgraded, 0 newly installed, 2503 to remove and 0 not upgraded.
After this operation, 7238 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'


The multiple warnings as well as the necessity to literally type:




Yes, do as I say!




are security means in place to keep you from destroying your system, as the system’s package manager apt is perfectly capable of doing that. Any command run with sudo should be run carefully and thoughtfully, but don’t fret: Nearly every experienced user of Ubuntu broke their system at least once, in fact that’s part of the fun if you ask me.



Further reading




  • this answer to apt-get remove with wildcard removed way more than expected. why?





share|improve this answer

























  • Yes I did. But there was only one prompt. And looking back I also thought it was a little overkill with all these warnings just for deleting an app :o)

    – Jesper Joachim Sørensen
    5 hours ago











  • okay. I have already reinstalled my ubuntu from scratch.

    – Jesper Joachim Sørensen
    5 hours ago







  • 5





    That is a serious flaw in apt-get IMO. [write] does not match libgcc1. It matches a substring (i) but not the whole package name. I didn't know of this behaviour before but maybe I should file a bug...

    – danzel
    5 hours ago






  • 2





    @MSalters [write] is an expression. I agree the manual is fuzzy there, but the underlying mechanics are very good and the security measures (see above) couldn’t be better IMO. This is more a case of insufficient documentation than a bug.

    – dessert
    4 hours ago







  • 2





    @danzel The manual is pretty clear about that: “Note that matching is done by substring (…). If this is undesired, anchor the regular expression with a '^' or '$' character, or create a more specific regular expression.”

    – dessert
    4 hours ago











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
);



);






Jesper Joachim Sørensen is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1141838%2fcan-sudo-apt-get-remove-write-destroy-my-ubuntu%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









28














The correct command to remove a package named write is:



sudo apt-get remove write


[write] is a character set matching the characters “w”, “r”, “i”, “t” and “e” and as matching is done by substring by apt. The command you ran thus matched all packages with one of these characters in it, which of course are a lot. To quote apt’s output listing just the essential ones:



WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
apt adduser (due to apt) gpgv (due to apt) ubuntu-keyring (due to apt) libapt-pkg5.0 (due to apt) libc6 (due to apt) libgcc1 (due to apt) libgnutls30 (due to apt) libseccomp2 (due to apt)
libstdc++6 (due to apt) base-files base-passwd libdebconfclient0 (due to base-passwd) bash libtinfo5 (due to bash) debianutils (due to bash) bsdutils libsystemd0 (due to bsdutils) coreutils
libacl1 (due to coreutils) libattr1 (due to coreutils) libselinux1 (due to coreutils) dash dpkg (due to dash) diffutils libbz2-1.0 (due to dpkg) liblzma5 (due to dpkg) libzstd1 (due to dpkg)
zlib1g (due to dpkg) tar (due to dpkg) e2fsprogs libblkid1 (due to e2fsprogs) libcom-err2 (due to e2fsprogs) libext2fs2 (due to e2fsprogs) libss2 (due to e2fsprogs) libuuid1 (due to e2fsprogs) fdisk
libfdisk1 (due to fdisk) libmount1 (due to fdisk) libncursesw5 (due to fdisk) libsmartcols1 (due to fdisk) findutils grep libpcre3 (due to grep) install-info (due to grep) gzip hostname init
systemd-sysv (due to init) init-system-helpers (due to init) perl-base (due to init-system-helpers) libc-bin login libaudit1 (due to login) libpam0g (due to login) libpam-runtime (due to login)
libpam-modules (due to login) mount util-linux (due to mount) ncurses-base ncurses-bin sed sysvinit-utils libudev1 (due to util-linux)
0 upgraded, 0 newly installed, 2503 to remove and 0 not upgraded.
After this operation, 7238 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'


The multiple warnings as well as the necessity to literally type:




Yes, do as I say!




are security means in place to keep you from destroying your system, as the system’s package manager apt is perfectly capable of doing that. Any command run with sudo should be run carefully and thoughtfully, but don’t fret: Nearly every experienced user of Ubuntu broke their system at least once, in fact that’s part of the fun if you ask me.



Further reading




  • this answer to apt-get remove with wildcard removed way more than expected. why?





share|improve this answer

























  • Yes I did. But there was only one prompt. And looking back I also thought it was a little overkill with all these warnings just for deleting an app :o)

    – Jesper Joachim Sørensen
    5 hours ago











  • okay. I have already reinstalled my ubuntu from scratch.

    – Jesper Joachim Sørensen
    5 hours ago







  • 5





    That is a serious flaw in apt-get IMO. [write] does not match libgcc1. It matches a substring (i) but not the whole package name. I didn't know of this behaviour before but maybe I should file a bug...

    – danzel
    5 hours ago






  • 2





    @MSalters [write] is an expression. I agree the manual is fuzzy there, but the underlying mechanics are very good and the security measures (see above) couldn’t be better IMO. This is more a case of insufficient documentation than a bug.

    – dessert
    4 hours ago







  • 2





    @danzel The manual is pretty clear about that: “Note that matching is done by substring (…). If this is undesired, anchor the regular expression with a '^' or '$' character, or create a more specific regular expression.”

    – dessert
    4 hours ago















28














The correct command to remove a package named write is:



sudo apt-get remove write


[write] is a character set matching the characters “w”, “r”, “i”, “t” and “e” and as matching is done by substring by apt. The command you ran thus matched all packages with one of these characters in it, which of course are a lot. To quote apt’s output listing just the essential ones:



WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
apt adduser (due to apt) gpgv (due to apt) ubuntu-keyring (due to apt) libapt-pkg5.0 (due to apt) libc6 (due to apt) libgcc1 (due to apt) libgnutls30 (due to apt) libseccomp2 (due to apt)
libstdc++6 (due to apt) base-files base-passwd libdebconfclient0 (due to base-passwd) bash libtinfo5 (due to bash) debianutils (due to bash) bsdutils libsystemd0 (due to bsdutils) coreutils
libacl1 (due to coreutils) libattr1 (due to coreutils) libselinux1 (due to coreutils) dash dpkg (due to dash) diffutils libbz2-1.0 (due to dpkg) liblzma5 (due to dpkg) libzstd1 (due to dpkg)
zlib1g (due to dpkg) tar (due to dpkg) e2fsprogs libblkid1 (due to e2fsprogs) libcom-err2 (due to e2fsprogs) libext2fs2 (due to e2fsprogs) libss2 (due to e2fsprogs) libuuid1 (due to e2fsprogs) fdisk
libfdisk1 (due to fdisk) libmount1 (due to fdisk) libncursesw5 (due to fdisk) libsmartcols1 (due to fdisk) findutils grep libpcre3 (due to grep) install-info (due to grep) gzip hostname init
systemd-sysv (due to init) init-system-helpers (due to init) perl-base (due to init-system-helpers) libc-bin login libaudit1 (due to login) libpam0g (due to login) libpam-runtime (due to login)
libpam-modules (due to login) mount util-linux (due to mount) ncurses-base ncurses-bin sed sysvinit-utils libudev1 (due to util-linux)
0 upgraded, 0 newly installed, 2503 to remove and 0 not upgraded.
After this operation, 7238 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'


The multiple warnings as well as the necessity to literally type:




Yes, do as I say!




are security means in place to keep you from destroying your system, as the system’s package manager apt is perfectly capable of doing that. Any command run with sudo should be run carefully and thoughtfully, but don’t fret: Nearly every experienced user of Ubuntu broke their system at least once, in fact that’s part of the fun if you ask me.



Further reading




  • this answer to apt-get remove with wildcard removed way more than expected. why?





share|improve this answer

























  • Yes I did. But there was only one prompt. And looking back I also thought it was a little overkill with all these warnings just for deleting an app :o)

    – Jesper Joachim Sørensen
    5 hours ago











  • okay. I have already reinstalled my ubuntu from scratch.

    – Jesper Joachim Sørensen
    5 hours ago







  • 5





    That is a serious flaw in apt-get IMO. [write] does not match libgcc1. It matches a substring (i) but not the whole package name. I didn't know of this behaviour before but maybe I should file a bug...

    – danzel
    5 hours ago






  • 2





    @MSalters [write] is an expression. I agree the manual is fuzzy there, but the underlying mechanics are very good and the security measures (see above) couldn’t be better IMO. This is more a case of insufficient documentation than a bug.

    – dessert
    4 hours ago







  • 2





    @danzel The manual is pretty clear about that: “Note that matching is done by substring (…). If this is undesired, anchor the regular expression with a '^' or '$' character, or create a more specific regular expression.”

    – dessert
    4 hours ago













28












28








28







The correct command to remove a package named write is:



sudo apt-get remove write


[write] is a character set matching the characters “w”, “r”, “i”, “t” and “e” and as matching is done by substring by apt. The command you ran thus matched all packages with one of these characters in it, which of course are a lot. To quote apt’s output listing just the essential ones:



WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
apt adduser (due to apt) gpgv (due to apt) ubuntu-keyring (due to apt) libapt-pkg5.0 (due to apt) libc6 (due to apt) libgcc1 (due to apt) libgnutls30 (due to apt) libseccomp2 (due to apt)
libstdc++6 (due to apt) base-files base-passwd libdebconfclient0 (due to base-passwd) bash libtinfo5 (due to bash) debianutils (due to bash) bsdutils libsystemd0 (due to bsdutils) coreutils
libacl1 (due to coreutils) libattr1 (due to coreutils) libselinux1 (due to coreutils) dash dpkg (due to dash) diffutils libbz2-1.0 (due to dpkg) liblzma5 (due to dpkg) libzstd1 (due to dpkg)
zlib1g (due to dpkg) tar (due to dpkg) e2fsprogs libblkid1 (due to e2fsprogs) libcom-err2 (due to e2fsprogs) libext2fs2 (due to e2fsprogs) libss2 (due to e2fsprogs) libuuid1 (due to e2fsprogs) fdisk
libfdisk1 (due to fdisk) libmount1 (due to fdisk) libncursesw5 (due to fdisk) libsmartcols1 (due to fdisk) findutils grep libpcre3 (due to grep) install-info (due to grep) gzip hostname init
systemd-sysv (due to init) init-system-helpers (due to init) perl-base (due to init-system-helpers) libc-bin login libaudit1 (due to login) libpam0g (due to login) libpam-runtime (due to login)
libpam-modules (due to login) mount util-linux (due to mount) ncurses-base ncurses-bin sed sysvinit-utils libudev1 (due to util-linux)
0 upgraded, 0 newly installed, 2503 to remove and 0 not upgraded.
After this operation, 7238 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'


The multiple warnings as well as the necessity to literally type:




Yes, do as I say!




are security means in place to keep you from destroying your system, as the system’s package manager apt is perfectly capable of doing that. Any command run with sudo should be run carefully and thoughtfully, but don’t fret: Nearly every experienced user of Ubuntu broke their system at least once, in fact that’s part of the fun if you ask me.



Further reading




  • this answer to apt-get remove with wildcard removed way more than expected. why?





share|improve this answer















The correct command to remove a package named write is:



sudo apt-get remove write


[write] is a character set matching the characters “w”, “r”, “i”, “t” and “e” and as matching is done by substring by apt. The command you ran thus matched all packages with one of these characters in it, which of course are a lot. To quote apt’s output listing just the essential ones:



WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
apt adduser (due to apt) gpgv (due to apt) ubuntu-keyring (due to apt) libapt-pkg5.0 (due to apt) libc6 (due to apt) libgcc1 (due to apt) libgnutls30 (due to apt) libseccomp2 (due to apt)
libstdc++6 (due to apt) base-files base-passwd libdebconfclient0 (due to base-passwd) bash libtinfo5 (due to bash) debianutils (due to bash) bsdutils libsystemd0 (due to bsdutils) coreutils
libacl1 (due to coreutils) libattr1 (due to coreutils) libselinux1 (due to coreutils) dash dpkg (due to dash) diffutils libbz2-1.0 (due to dpkg) liblzma5 (due to dpkg) libzstd1 (due to dpkg)
zlib1g (due to dpkg) tar (due to dpkg) e2fsprogs libblkid1 (due to e2fsprogs) libcom-err2 (due to e2fsprogs) libext2fs2 (due to e2fsprogs) libss2 (due to e2fsprogs) libuuid1 (due to e2fsprogs) fdisk
libfdisk1 (due to fdisk) libmount1 (due to fdisk) libncursesw5 (due to fdisk) libsmartcols1 (due to fdisk) findutils grep libpcre3 (due to grep) install-info (due to grep) gzip hostname init
systemd-sysv (due to init) init-system-helpers (due to init) perl-base (due to init-system-helpers) libc-bin login libaudit1 (due to login) libpam0g (due to login) libpam-runtime (due to login)
libpam-modules (due to login) mount util-linux (due to mount) ncurses-base ncurses-bin sed sysvinit-utils libudev1 (due to util-linux)
0 upgraded, 0 newly installed, 2503 to remove and 0 not upgraded.
After this operation, 7238 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'


The multiple warnings as well as the necessity to literally type:




Yes, do as I say!




are security means in place to keep you from destroying your system, as the system’s package manager apt is perfectly capable of doing that. Any command run with sudo should be run carefully and thoughtfully, but don’t fret: Nearly every experienced user of Ubuntu broke their system at least once, in fact that’s part of the fun if you ask me.



Further reading




  • this answer to apt-get remove with wildcard removed way more than expected. why?






share|improve this answer














share|improve this answer



share|improve this answer








edited 3 hours ago









Fabby

27.4k1562167




27.4k1562167










answered 5 hours ago









dessertdessert

26.2k676111




26.2k676111












  • Yes I did. But there was only one prompt. And looking back I also thought it was a little overkill with all these warnings just for deleting an app :o)

    – Jesper Joachim Sørensen
    5 hours ago











  • okay. I have already reinstalled my ubuntu from scratch.

    – Jesper Joachim Sørensen
    5 hours ago







  • 5





    That is a serious flaw in apt-get IMO. [write] does not match libgcc1. It matches a substring (i) but not the whole package name. I didn't know of this behaviour before but maybe I should file a bug...

    – danzel
    5 hours ago






  • 2





    @MSalters [write] is an expression. I agree the manual is fuzzy there, but the underlying mechanics are very good and the security measures (see above) couldn’t be better IMO. This is more a case of insufficient documentation than a bug.

    – dessert
    4 hours ago







  • 2





    @danzel The manual is pretty clear about that: “Note that matching is done by substring (…). If this is undesired, anchor the regular expression with a '^' or '$' character, or create a more specific regular expression.”

    – dessert
    4 hours ago

















  • Yes I did. But there was only one prompt. And looking back I also thought it was a little overkill with all these warnings just for deleting an app :o)

    – Jesper Joachim Sørensen
    5 hours ago











  • okay. I have already reinstalled my ubuntu from scratch.

    – Jesper Joachim Sørensen
    5 hours ago







  • 5





    That is a serious flaw in apt-get IMO. [write] does not match libgcc1. It matches a substring (i) but not the whole package name. I didn't know of this behaviour before but maybe I should file a bug...

    – danzel
    5 hours ago






  • 2





    @MSalters [write] is an expression. I agree the manual is fuzzy there, but the underlying mechanics are very good and the security measures (see above) couldn’t be better IMO. This is more a case of insufficient documentation than a bug.

    – dessert
    4 hours ago







  • 2





    @danzel The manual is pretty clear about that: “Note that matching is done by substring (…). If this is undesired, anchor the regular expression with a '^' or '$' character, or create a more specific regular expression.”

    – dessert
    4 hours ago
















Yes I did. But there was only one prompt. And looking back I also thought it was a little overkill with all these warnings just for deleting an app :o)

– Jesper Joachim Sørensen
5 hours ago





Yes I did. But there was only one prompt. And looking back I also thought it was a little overkill with all these warnings just for deleting an app :o)

– Jesper Joachim Sørensen
5 hours ago













okay. I have already reinstalled my ubuntu from scratch.

– Jesper Joachim Sørensen
5 hours ago






okay. I have already reinstalled my ubuntu from scratch.

– Jesper Joachim Sørensen
5 hours ago





5




5





That is a serious flaw in apt-get IMO. [write] does not match libgcc1. It matches a substring (i) but not the whole package name. I didn't know of this behaviour before but maybe I should file a bug...

– danzel
5 hours ago





That is a serious flaw in apt-get IMO. [write] does not match libgcc1. It matches a substring (i) but not the whole package name. I didn't know of this behaviour before but maybe I should file a bug...

– danzel
5 hours ago




2




2





@MSalters [write] is an expression. I agree the manual is fuzzy there, but the underlying mechanics are very good and the security measures (see above) couldn’t be better IMO. This is more a case of insufficient documentation than a bug.

– dessert
4 hours ago






@MSalters [write] is an expression. I agree the manual is fuzzy there, but the underlying mechanics are very good and the security measures (see above) couldn’t be better IMO. This is more a case of insufficient documentation than a bug.

– dessert
4 hours ago





2




2





@danzel The manual is pretty clear about that: “Note that matching is done by substring (…). If this is undesired, anchor the regular expression with a '^' or '$' character, or create a more specific regular expression.”

– dessert
4 hours ago





@danzel The manual is pretty clear about that: “Note that matching is done by substring (…). If this is undesired, anchor the regular expression with a '^' or '$' character, or create a more specific regular expression.”

– dessert
4 hours ago










Jesper Joachim Sørensen is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















Jesper Joachim Sørensen is a new contributor. Be nice, and check out our Code of Conduct.












Jesper Joachim Sørensen is a new contributor. Be nice, and check out our Code of Conduct.











Jesper Joachim Sørensen is a new contributor. Be nice, and check out our Code of Conduct.














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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1141838%2fcan-sudo-apt-get-remove-write-destroy-my-ubuntu%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

Siegen Nawigatsjuun

Log på Navigationsmenu

Log på Navigationsmenu