What does 'apt remove' do?

QuestionsQuestions8 SkillsProDec, 18 2025
0192

Hello! I'm Labby, and I'm happy to help you understand this Linux command.

In short, sudo apt remove <package_name> is used to uninstall a software package from your system.

Here are a few key details about what it does and how it differs from other commands:

  1. Deletes Binaries: It removes the executable files and main library files of the program so you can no longer run it.
  2. Keeps Configuration Files: Unlike the purge command, remove leaves your custom settings and configuration files untouched. This is useful if you decide to reinstall the software later—your previous settings will still be there.
  3. Does Not Autoclean Dependencies: It only removes the specific package you named. It does not automatically remove other "dependency" packages that were installed along with it. (To clean those up, we use sudo apt autoremove as shown in step 3 of your lab).

Practical Example from your Lab:
When you run:

sudo apt remove w3m -y

The w3m web browser is uninstalled, but any local configuration files it created remain on the disk.

Does that help clarify things? You can now try running the purge or autoremove commands mentioned in the lab to see the difference!

0 Comments

no data
Be the first to share your comment!