How to remove temp installation packages

10,433

Solution 1

I'm not sure why sudo apt-get clean isn't found for you, but one way to clear up some space is to run sudo apt-get autoremove, which can remove packages that aren't used by any other packages (such as a package installed with another package as a dependency but the package that depended on it is no longer installed, sorry if that didn't make much sense).

One other way to clear up space is to just restart your computer. That will (if I remember correctly) clear out your entire /tmp directory, which stores temporary files.

If the program that spits out the not found error is sudo and not apt, then you would have a much more serious issue on your hands, and the only way I can think of to restore Aptitude (more commonly known as apt or apt-get) is to reinstall Ubuntu.

Hope this helps.

Solution 2

I think you have some problems with your installation or you have install your OS in some way i am not familiar with, since it shouldn't show " command not found" error. Also in your error message it shouldn't be showing " on /boot".

Leaving aside, try

sudo apt-get autoremove

it will remove any unused packages from your system.

Share:
10,433

Related videos on Youtube

ankit7540
Author by

ankit7540

Updated on September 18, 2022

Comments

  • ankit7540
    ankit7540 over 1 year

    Not very well versed with Ubuntu. I got this message when I tried to get some updates:

    The upgrade needs a total of 31.9 M free space on disk '/boot'. 
    Please free at least an additional 27.6 M of disk space on '/boot'. 
    Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean'.
    

    When I'm trying to run 'sudo apt-get clean', it says command not found. How do I remove temp packages?

    • vivid_vibe
      vivid_vibe over 10 years
      That's weird about getting the message "command not found" for the 'clean' command. Try 'sudo apt-get autoremove' and see if that frees up some space for you.
    • Chai T. Rex
      Chai T. Rex over 7 years
      Please edit your question, paste the full output of sudo apt-get clean, select the text you pasted, and press the {} button on the question editor.
  • AlexP
    AlexP over 7 years
    apt, apt-get, and Aptitude are three different programs. The only thing they have in common is that they manage .deb software packages.