Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

sudo apt-get autoremove .

OUTPUT:

WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
apt libapt-pkg4.12 (due to apt) libc6 (due to apt) libgcc1 (due to apt)
libstdc++6 (due to apt) ubuntu-keyring (due to apt) gnupg (due to apt)
base-files base-passwd libdebconfclient0 (due to base-passwd) bash
debianutils (due to bash) dash (due to bash) libtinfo5 (due to bash)
bsdutils coreutils libacl1 (due to coreutils) libattr1 (due to coreutils)
libselinux1 (due to coreutils) dpkg (due to dash) sensible-utils (due to
debianutils) diffutils libbz2-1.0 (due to dpkg) liblzma5 (due to dpkg)
zlib1g (due to dpkg) tar (due to dpkg) e2fsprogs e2fslibs (due to e2fsprogs)
libblkid1 (due to e2fsprogs) libcomerr2 (due to e2fsprogs) libss2 (due to
e2fsprogs) libuuid1 (due to e2fsprogs) util-linux (due to e2fsprogs)
findutils grep install-info (due to grep) libpcre3 (due to grep) gzip
hostname libc-bin libcap2 (due to libc-bin) login libpam0g (due to login)
libpam-runtime (due to login) libpam-modules (due to login) mount libmount1
(due to mount) ncurses-base ncurses-bin perl-base sed lsb-base (due to
util-linux) tzdata (due to util-linux) debconf (due to util-linux) sysv-rc
(due to util-linux) libncurses5 (due to util-linux) libslang2 (due to
util-linux)
0 upgraded, 0 newly installed, 2913 to remove and 0 not upgraded.
After this operation, 8,775 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?] 

What does that dot do?

share|improve this question

1 Answer 1

up vote 7 down vote accepted

Wow, first don't do that. The command:

apt-get autoremove a_packet_name

Will remove the specified package and all it's dependencies. But you can use regular expression as package names. So a packet name of . will match every installed packages on your system. Indeed very harmful!

Additional details from man apt-get:

If no package matches the given expression and the expression contains one of '.', '?' or '*' then it is assumed to be a POSIX regular expression, and it is applied to all package names in the database. Any matches are then installed (or removed). Note that matching is done by substring so 'lo.*' matches 'how-lo' and 'lowest'. If this is undesired, anchor the regular expression with a '^' or '$' character, or create a more specific regular expression.

share|improve this answer
    
Isn't autoremove for removing non-used appurtenant of (a) software(s)? –  mini Jul 26 at 14:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.