apt-purge
Remove packages together with their configuration files.
TLDR
Purge a package
$ sudo apt purge [package]
Purge several packages$ sudo apt purge [package1] [package2]
Also remove unused dependencies$ sudo apt purge --autoremove [package]
Simulate a purge$ apt purge -s [package]
Answer yes to prompts$ sudo apt purge -y [package]
SYNOPSIS
apt purge [options] package...
DESCRIPTION
apt purge removes one or more packages and the configuration files that package shipped, including files under `/etc`. It is the same operation as apt remove --purge. Files a user created in a home directory are left in place.The command is a subcommand of apt. apt-get purge does the same work.
PARAMETERS
-y, --yes
Assume "yes" for prompts.--autoremove
Also remove packages that were installed only to satisfy dependencies and are no longer needed.-s, --simulate
Show the planned removals. --dry-run is equivalent.-d, --download-only
Resolve the transaction. Do not remove packages.-c, --config-file file
Read the named APT configuration file.-o, --option key=value
Set a configuration option for this run.
CAVEATS
Purging deletes conffiles, including locally edited copies of those files. Data stored in home directories, databases created at runtime, and files outside the package's file list stay on disk. The command may remove other packages when dependencies require it.
SEE ALSO
apt(8), apt-remove(8), apt-autoremove(8), apt-get(8), dpkg(1)
