# The Ubuntu Forum Community > Ubuntu Official Flavours Support > New to Ubuntu > [ubuntu] What does sudo apt-get autoremove do?

## dawiba

Title says it all.

I saw this in another post and assume it gets rid of junk.

I couldn't find it on linuxcommand.org.

Sorry for the basic nature of the question  :Embarassed:

----------


## PriceChild

From 

```
man apt-get
```

...


> autoremove
>            autoremove is used to remove packages that were automatically
>            installed to satisfy dependencies for some package and that are no
>            more needed.

----------


## Michael.Godawski

Have a look here:

http://ubuntuforums.org/showthread.php?t=377542http://www.ubuntugeek.com/cleaning-u...in-ubuntu.html

 This command removes packages that were installed by other packages and are no longer needed.

----------


## cmnorton

I would not call it junk. It removes packages no longer needed. If you search just the Ubuntu forums, you'll see a lot of commentary on this. Before running this command, I suggest backing up your package area.

----------


## cariboo

From man apt-get



> autoremove is used to remove packages that were automatically installed to satisfy dependencies for some package and that are no more needed.


If you want more info on a command check the man pages eg:



```
man apt-get
```

Jim

----------


## blackened

If you remove an application apt-get autoremove will remove the dependencies that were installed with that application and are no longer used by anything else on the system.

Edit:
Wow, lot of people paying attention today.  :Smile:

----------


## silkstone

If you'd like to free up drive space, a useful and safe command is...

sudo apt-get clean

That removes the aptitude cache in /var/cache/apt/archives

You'd be amazed how much is in there! You don't need to keep it, and the only drawback is that the packages would have to be downloaded again if you wanted to reinstall them.

----------


## mc4man

I would take the "that are no more needed." not so literally if your running 8.10 and happen to do some compiling of sources.

APT was patched to mark all packages installed with 'apt-get build-deb' as automatically installed which then includes them immediately in 'autoremove'. (and renders using aptitude useless

There's an option to prevent this but as of yet can't see how to apply.

----------


## dawiba

Thanks everyone, I've got the idea!

----------


## Godzeye

can sudo apt-get autoremove be undone without reinstalling the packages u  think u want to keep.

----------


## CharlesA

No.

Should have made a new thead instead of resing out two years old.

----------

