Skip to main content

apt_remove

Function apt_remove 

Source
pub fn apt_remove(package: &str) -> ActionSpec
Expand description

Remove a package but keep its configuration files (action-steps apt remove <package>, which runs apt-get -o APT::Cmd::Pattern-Only=1 remove -y -- <package>).

The package name is validated by validated_unmodified_package, which refuses a trailing + (apt-get reads pkg+ on remove as “install pkg”) and a trailing -.

Risk: Medium. Configuration files remain in /etc; reversible by reinstalling the package. Use apt_purge to also remove config files.