🔍 See Original Answer on Ask Ubuntu 🔗
Can 'sudo apt-get remove [write]' destroy my Ubuntu?
May 10, 2019
Edited: May 11, 2019
November 24, 2022
Copy to clipboard: false
Before doing an
sudo apt-get, it is wise to do a simulation:
$ apt-get remove [write] -s | wc -l 65280
There are nearly 65,280 packages that qualify for removal if installed on your system.
[write] is a search pattern for Regex matching causing every package to be selected if it contains:
- The letter
|Output is piped to the Word Count command with `||wc -l
Simulation is specified with the
-s flag. You can also use the
--simulate flag for greater readability. Another advantage of a simulation is you don’t need
sudo powers which many of us have learned can be dangerous at times.
To get an idea of the package names involved pipe output to the
$ apt-get remove [write] --simulate | less NOTE: This is only a simulation! apt-get needs root privileges for real execution. Also keep in mind that locking is deactivated, so don't depend on the relevance to the real current situation! Reading package lists... Building dependency tree... Reading state information... Package 'libpam-pin' is not installed, so not removed Package 'activity-log-manager-common' is not installed, so not removed Package 'libnet-patricial-perl' is not installed, so not removed Package 'pe' is not installed, so not removed (.... Plus 65,269 more packages ....)