Ubuntu – Can’t install unity tweak tool

command linepackage-managementsoftware installationunity-tweak-tool

I tried multiple times installing the unity tweak tool via the terminal but every time it give me the following output. Similarly i cant install it via the Ubuntu software center. I have tried sudo apt-get install -f & sudo apt-get install unity-tweak-tool . the output when using the terminal is as follows:

nikunj@nikunj-DL-H61MXE-V:~$ sudo apt-get install unity-tweak-tool
[sudo] password for nikunj: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 170 not upgraded.
Need to get 0 B/368 kB of archives.
After this operation, 2,761 kB of additional disk space will be used.
(Reading database ... 197290 files and directories currently installed.)
Preparing to unpack .../unity-tweak-tool_0.0.7-0~201~ubuntu15.10.1_all.deb ...
Unpacking unity-tweak-tool (0.0.7-0~201~ubuntu15.10.1) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/unity-tweak-tool_0.0.7-0~201~ubuntu15.10.1_all.deb (--unpack):
 cannot copy extracted data for './usr/share/unity-tweak-tool/monitor-window-snapping.png' to '/usr/share/unity-tweak-tool/monitor-window-snapping.png.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Best Answer

It seems that the package in cache is damaged. Clean first the cache with the command:

sudo apt-get clean

before install the package with:

sudo apt-get install unity-tweak-tool
Related Question