APT – Can APT Be Removed with APT?

aptuninstall

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
  unattended-upgrades
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  apt
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 [0.96.13.1]
Remv software-properties-common [0.96.13.1]
Remv python3-software-properties [0.96.13.1]
Remv unattended-upgrades [0.86.2ubuntu1]
Remv apt-utils [1.0.10.2ubuntu1]
Remv apt [1.0.10.2ubuntu1]

So the answer should be: yes, you can.