Ubuntu – Could I remove apt with apt


I know that I can use apt-get remove <package> to remove a program.

But apt is a program itself. Could I use apt-get remove apt to remove it, or would it get confused part way through?

Best Answer

APT lets you simulate your commands using the option -s. You can try this yourself, issuing the command apt-get -s remove apt (no sudo needed).

This yields the following output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apturl-common xul-ext-ubufox
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  apt apt-utils apturl nautilus-share python3-software-properties
  software-properties-common software-properties-gtk ubuntu-desktop
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
0 upgraded, 0 newly installed, 9 to remove and 0 not upgraded.
Remv ubuntu-desktop [1.341]
Remv nautilus-share [0.7.3-1ubuntu5]
Remv apturl [0.5.2ubuntu9]
Remv software-properties-gtk []
Remv software-properties-common []
Remv python3-software-properties []
Remv unattended-upgrades [0.86.2ubuntu1]
Remv apt-utils []
Remv apt []

So the answer should be: yes, you can.