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.

I've got a question regarding how to delete all source codes that I've downloaded.

I think it just consumes a lot of space without any benefit yet!

Thanks in advance :)

share|improve this question
    
How did you download the source codes - sudo apt-get source <package-name>? About the other question, please do post a new question :) –  nitstorm Jul 9 '12 at 14:03
    
@nitstorm thanks dear, i've downloaded 'em using Update manager but i've unchecked the rep. recently. I wanna remove all source codes. I'll post another question, thanks again :D –  BaderSur Jul 9 '12 at 14:08
    
You mean you want to clear the Package Caches installed through update manager.Or do you want to Uninstall the installed packages. –  atenz Jul 9 '12 at 14:19
    
@tijybba i meant to remove source codes of packages. how can i know what source codes that have been downloaded?! where are they stored?? –  BaderSur Jul 9 '12 at 16:19
    
See the below @swift answer , and also visit the linked page for more reference. –  atenz Jul 9 '12 at 16:25
show 2 more comments

2 Answers 2

I suggest you read this Community Documentation article: Recover Lost Disk Space

From link:

How to find lost space

To check the amount of space being used for package storage, run:

du -h /var/cache/apt/

How to Fix It

There are several system commands you can use to reduce or eliminate the number of locally stored packages.

  • Remove all expired packages from /var/cache/apt/archives and /var/cache/apt/archives/partial that are no longer available for download:

    sudo apt-get autoclean
    

    "Not available for download" does not mean the user should save them - normally these files have been replaced or are no longer needed.

  • Remove all the packages from /var/cache/apt/archives and /var/cache/apt/archives/partial folders:

    sudo apt-get clean
    
  • Remove unneeded dependencies which are no longer needed:

    sudo apt-get autoremove
    

Synaptic custom filter practice can also help for search packages:

You can use this method for searching custom packages, but I DON'T RECOMMEND IT as universal method for cleaning.

Settings -> Filters

You can choose different Statuses for New Filter :

New Filter with Status

And create different Properties :

New Filter with Properties

Good Luck!

share|improve this answer
    
you are right; i wanna get more free space on my OS! I think update manager had installed source codes with applications as well. I wanna remove them from my system. above commands didn't help me! thanks anyway :D –  BaderSur Jul 9 '12 at 16:26
    
then you should comment links in sourcelist which begin deb-src OR uncheck checkboxes for sources in repository settings ... then run sudo apt-get update and NEXT fix your space with commands above. Official guide have detailed practice for most cases about Recovering Missing Disk Space. –  swift Jul 9 '12 at 16:40
    
thanks a lot but I'll check it later cuz my Internet subscription will finish soon! I'll let you know later on :D –  BaderSur Jul 9 '12 at 17:27
add comment

I use the Janitor option in Ubuntu Tweak that gets rid of a lot of extra space. Maybe this will delete your source files as well as it deletes all of the Update managers cached files.

share|improve this answer
    
would also add bleach bit to the list. –  senshikaze Jul 9 '12 at 14:22
1  
No really not recommended ,see this. Use the in-built tools instead. –  atenz Jul 9 '12 at 14:43
add comment

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.